mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-29 17:45:38 +00:00
Fixed non-ASCII characters never setting an initial selected value for "jump to letter."
This commit is contained in:
parent
5d0fc6a1b7
commit
a6a9fff50f
|
@ -10,12 +10,13 @@ GuiGamelistOptions::GuiGamelistOptions(Window* window, SystemData* system) : Gui
|
||||||
addChild(&mMenu);
|
addChild(&mMenu);
|
||||||
|
|
||||||
// jump to letter
|
// jump to letter
|
||||||
char curChar = getGamelist()->getCursor()->getName()[0];
|
char curChar = toupper(getGamelist()->getCursor()->getName()[0]);
|
||||||
|
if(curChar < 'A' || curChar > 'Z')
|
||||||
|
curChar = 'A';
|
||||||
|
|
||||||
mJumpToLetterList = std::make_shared<LetterList>(mWindow, "JUMP TO LETTER", false);
|
mJumpToLetterList = std::make_shared<LetterList>(mWindow, "JUMP TO LETTER", false);
|
||||||
for(char c = 'A'; c <= 'Z'; c++)
|
for(char c = 'A'; c <= 'Z'; c++)
|
||||||
{
|
|
||||||
mJumpToLetterList->add(std::string(1, c), c, c == curChar);
|
mJumpToLetterList->add(std::string(1, c), c, c == curChar);
|
||||||
}
|
|
||||||
|
|
||||||
ComponentListRow row;
|
ComponentListRow row;
|
||||||
row.addElement(std::make_shared<TextComponent>(mWindow, "JUMP TO LETTER", Font::get(FONT_SIZE_MEDIUM), 0x777777FF), true);
|
row.addElement(std::make_shared<TextComponent>(mWindow, "JUMP TO LETTER", Font::get(FONT_SIZE_MEDIUM), 0x777777FF), true);
|
||||||
|
|
Loading…
Reference in a new issue