Commit 95e1d8c7 authored by Aloshi's avatar Aloshi

Changed some help prompts.

Added back button to OptionListComponent in single select mode.
parent e051b75b
......@@ -445,11 +445,11 @@ std::vector<HelpPrompt> ComponentGrid::getHelpPrompts()
}
if(canScrollHoriz && canScrollVert)
prompts.push_back(HelpPrompt("up/down/left/right", "move"));
prompts.push_back(HelpPrompt("up/down/left/right", "choose"));
else if(canScrollHoriz)
prompts.push_back(HelpPrompt("left/right", "move"));
prompts.push_back(HelpPrompt("left/right", "choose"));
else if(canScrollVert)
prompts.push_back(HelpPrompt("up/down", "move"));
prompts.push_back(HelpPrompt("up/down", "choose"));
return prompts;
}
......@@ -321,7 +321,7 @@ std::vector<HelpPrompt> ComponentList::getHelpPrompts()
}
if(addMovePrompt)
prompts.push_back(HelpPrompt("up/down", "move"));
prompts.push_back(HelpPrompt("up/down", "choose"));
}
return prompts;
......
......@@ -310,3 +310,10 @@ void ImageComponent::applyTheme(const std::shared_ptr<ThemeData>& theme, const s
if(properties & COLOR && elem->has("color"))
setColorShift(elem->get<unsigned int>("color"));
}
std::vector<HelpPrompt> ImageComponent::getHelpPrompts()
{
std::vector<HelpPrompt> ret;
ret.push_back(HelpPrompt("a", "select"));
return ret;
}
......@@ -60,6 +60,7 @@ public:
virtual void applyTheme(const std::shared_ptr<ThemeData>& theme, const std::string& view, const std::string& element, unsigned int properties) override;
virtual std::vector<HelpPrompt> getHelpPrompts() override;
private:
Eigen::Vector2f mTargetSize;
Eigen::Vector2f mOrigin;
......
......@@ -82,8 +82,7 @@ private:
mMenu.addRow(row, (!mParent->mMultiSelect && it->selected));
}
if(mParent->mMultiSelect)
mMenu.addButton("BACK", "accept", [this] { delete this; });
mMenu.addButton("BACK", "accept", [this] { delete this; });
mMenu.setPosition((Renderer::getScreenWidth() - mMenu.getSize().x()) / 2, Renderer::getScreenHeight() * 0.15f);
addChild(&mMenu);
......@@ -102,7 +101,9 @@ private:
std::vector<HelpPrompt> getHelpPrompts() override
{
return mMenu.getHelpPrompts();
auto prompts = mMenu.getHelpPrompts();
prompts.push_back(HelpPrompt("b", "back"));
return prompts;
}
};
......@@ -274,7 +275,7 @@ private:
if(!mMultiSelect)
prompts.push_back(HelpPrompt("left/right", "change"));
prompts.push_back(HelpPrompt("a", "change"));
prompts.push_back(HelpPrompt("a", "select"));
return prompts;
}
......
......@@ -260,7 +260,8 @@ bool GuiMenu::input(InputConfig* config, Input input)
std::vector<HelpPrompt> GuiMenu::getHelpPrompts()
{
std::vector<HelpPrompt> prompts;
prompts.push_back(HelpPrompt("up/down", "move"));
prompts.push_back(HelpPrompt("a", "go"));
prompts.push_back(HelpPrompt("up/down", "choose"));
prompts.push_back(HelpPrompt("a", "select"));
prompts.push_back(HelpPrompt("start", "close"));
return prompts;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment