mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 15:45: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> GuiTextEditKeyboardPopup::getHelpPrompts()
|
||||||
{
|
{
|
||||||
std::vector<HelpPrompt> prompts = mGrid.getHelpPrompts();
|
std::vector<HelpPrompt> prompts {mGrid.getHelpPrompts()};
|
||||||
|
|
||||||
if (!mText->isEditing()) {
|
if (!mText->isEditing()) {
|
||||||
prompts.push_back(HelpPrompt("lt", "shift"));
|
prompts.push_back(HelpPrompt("lt", "shift"));
|
||||||
prompts.push_back(HelpPrompt("rt", "alt"));
|
prompts.push_back(HelpPrompt("rt", "alt"));
|
||||||
}
|
}
|
||||||
|
else if (mMultiLine) {
|
||||||
|
prompts.push_back(HelpPrompt("a", "newline"));
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
prompts.push_back(HelpPrompt("a", mAcceptBtnHelpText));
|
prompts.push_back(HelpPrompt("a", mAcceptBtnHelpText));
|
||||||
}
|
}
|
||||||
|
@ -496,17 +499,13 @@ std::vector<HelpPrompt> GuiTextEditKeyboardPopup::getHelpPrompts()
|
||||||
|
|
||||||
if (prompts.size() > 0 && prompts.front().second == OK_SYMBOL)
|
if (prompts.size() > 0 && prompts.front().second == OK_SYMBOL)
|
||||||
prompts.front().second = mAcceptBtnHelpText;
|
prompts.front().second = mAcceptBtnHelpText;
|
||||||
|
else if (prompts.size() > 0 && prompts.front().second == " ")
|
||||||
if (prompts.size() > 0 && prompts.front().second == " ")
|
|
||||||
prompts.front().second = "SPACE";
|
prompts.front().second = "SPACE";
|
||||||
|
else if (prompts.size() > 0 && prompts.front().second == "CLEAR")
|
||||||
if (prompts.size() > 0 && prompts.front().second == "CLEAR")
|
|
||||||
prompts.front().second = mClearBtnHelpText;
|
prompts.front().second = mClearBtnHelpText;
|
||||||
|
else if (prompts.size() > 0 && prompts.front().second == "LOAD")
|
||||||
if (prompts.size() > 0 && prompts.front().second == "LOAD")
|
|
||||||
prompts.front().second = mLoadBtnHelpText;
|
prompts.front().second = mLoadBtnHelpText;
|
||||||
|
else if (prompts.size() > 0 && prompts.front().second == "CANCEL")
|
||||||
if (prompts.size() > 0 && prompts.front().second == "CANCEL")
|
|
||||||
prompts.front().second = mCancelBtnHelpText;
|
prompts.front().second = mCancelBtnHelpText;
|
||||||
|
|
||||||
// If a prompt has no value set, then remove it.
|
// 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> GuiTextEditPopup::getHelpPrompts()
|
||||||
{
|
{
|
||||||
std::vector<HelpPrompt> prompts = mGrid.getHelpPrompts();
|
std::vector<HelpPrompt> prompts {mGrid.getHelpPrompts()};
|
||||||
|
|
||||||
if (mText->isEditing())
|
if (mText->isEditing()) {
|
||||||
prompts.push_back(HelpPrompt("a", mAcceptBtnText));
|
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("l", "backspace"));
|
||||||
prompts.push_back(HelpPrompt("r", "space"));
|
prompts.push_back(HelpPrompt("r", "space"));
|
||||||
|
|
Loading…
Reference in a new issue