mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 06:05:38 +00:00
Fixed an issue where the wrong help prompt was shown for the 'A' button when editing multi-line text fields.
This commit is contained in:
parent
aa33558952
commit
3b9ced603c
|
@ -480,12 +480,15 @@ void GuiTextEditKeyboardPopup::update(int deltaTime)
|
|||
|
||||
std::vector<HelpPrompt> GuiTextEditKeyboardPopup::getHelpPrompts()
|
||||
{
|
||||
std::vector<HelpPrompt> prompts = mGrid.getHelpPrompts();
|
||||
std::vector<HelpPrompt> prompts {mGrid.getHelpPrompts()};
|
||||
|
||||
if (!mText->isEditing()) {
|
||||
prompts.push_back(HelpPrompt("lt", "shift"));
|
||||
prompts.push_back(HelpPrompt("rt", "alt"));
|
||||
}
|
||||
else if (mMultiLine) {
|
||||
prompts.push_back(HelpPrompt("a", "newline"));
|
||||
}
|
||||
else {
|
||||
prompts.push_back(HelpPrompt("a", mAcceptBtnHelpText));
|
||||
}
|
||||
|
@ -496,17 +499,13 @@ std::vector<HelpPrompt> GuiTextEditKeyboardPopup::getHelpPrompts()
|
|||
|
||||
if (prompts.size() > 0 && prompts.front().second == OK_SYMBOL)
|
||||
prompts.front().second = mAcceptBtnHelpText;
|
||||
|
||||
if (prompts.size() > 0 && prompts.front().second == " ")
|
||||
else if (prompts.size() > 0 && prompts.front().second == " ")
|
||||
prompts.front().second = "SPACE";
|
||||
|
||||
if (prompts.size() > 0 && prompts.front().second == "CLEAR")
|
||||
else if (prompts.size() > 0 && prompts.front().second == "CLEAR")
|
||||
prompts.front().second = mClearBtnHelpText;
|
||||
|
||||
if (prompts.size() > 0 && prompts.front().second == "LOAD")
|
||||
else if (prompts.size() > 0 && prompts.front().second == "LOAD")
|
||||
prompts.front().second = mLoadBtnHelpText;
|
||||
|
||||
if (prompts.size() > 0 && prompts.front().second == "CANCEL")
|
||||
else if (prompts.size() > 0 && prompts.front().second == "CANCEL")
|
||||
prompts.front().second = mCancelBtnHelpText;
|
||||
|
||||
// If a prompt has no value set, then remove it.
|
||||
|
|
|
@ -251,10 +251,14 @@ void GuiTextEditPopup::update(int deltaTime)
|
|||
|
||||
std::vector<HelpPrompt> GuiTextEditPopup::getHelpPrompts()
|
||||
{
|
||||
std::vector<HelpPrompt> prompts = mGrid.getHelpPrompts();
|
||||
std::vector<HelpPrompt> prompts {mGrid.getHelpPrompts()};
|
||||
|
||||
if (mText->isEditing())
|
||||
prompts.push_back(HelpPrompt("a", mAcceptBtnText));
|
||||
if (mText->isEditing()) {
|
||||
if (mMultiLine)
|
||||
prompts.push_back(HelpPrompt("a", "newline"));
|
||||
else
|
||||
prompts.push_back(HelpPrompt("a", mAcceptBtnText));
|
||||
}
|
||||
|
||||
prompts.push_back(HelpPrompt("l", "backspace"));
|
||||
prompts.push_back(HelpPrompt("r", "space"));
|
||||
|
|
Loading…
Reference in a new issue