Changed some help prompts.

Added back button to OptionListComponent in single select mode.
This commit is contained in:
Aloshi 2014-05-16 16:21:33 -05:00
parent e051b75b4f
commit 95e1d8c7d8
6 changed files with 20 additions and 10 deletions

View file

@ -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;
}

View file

@ -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;

View file

@ -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;
}

View file

@ -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;

View file

@ -82,7 +82,6 @@ private:
mMenu.addRow(row, (!mParent->mMultiSelect && it->selected));
}
if(mParent->mMultiSelect)
mMenu.addButton("BACK", "accept", [this] { delete this; });
mMenu.setPosition((Renderer::getScreenWidth() - mMenu.getSize().x()) / 2, Renderer::getScreenHeight() * 0.15f);
@ -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;
}

View file

@ -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;
}