Consistent Help Style

This commit is contained in:
hex007 2017-05-28 11:13:00 -07:00
parent e27e7cfd19
commit 070ce4c21f
6 changed files with 25 additions and 0 deletions

View file

@ -190,6 +190,13 @@ bool GuiGamelistOptions::input(InputConfig* config, Input input)
return mMenu.input(config, input); return mMenu.input(config, input);
} }
HelpStyle GuiGamelistOptions::getHelpStyle()
{
HelpStyle style = HelpStyle();
style.applyTheme(mSystem->getTheme(), "system");
return style;
}
std::vector<HelpPrompt> GuiGamelistOptions::getHelpPrompts() std::vector<HelpPrompt> GuiGamelistOptions::getHelpPrompts()
{ {
auto prompts = mMenu.getHelpPrompts(); auto prompts = mMenu.getHelpPrompts();

View file

@ -14,6 +14,7 @@ public:
virtual bool input(InputConfig* config, Input input) override; virtual bool input(InputConfig* config, Input input) override;
virtual std::vector<HelpPrompt> getHelpPrompts() override; virtual std::vector<HelpPrompt> getHelpPrompts() override;
virtual HelpStyle getHelpStyle() override;
private: private:
void openGamelistFilter(); void openGamelistFilter();

View file

@ -323,6 +323,13 @@ bool GuiMenu::input(InputConfig* config, Input input)
return false; return false;
} }
HelpStyle GuiMenu::getHelpStyle()
{
HelpStyle style = HelpStyle();
style.applyTheme(ViewController::get()->getState().getSystem()->getTheme(), "system");
return style;
}
std::vector<HelpPrompt> GuiMenu::getHelpPrompts() std::vector<HelpPrompt> GuiMenu::getHelpPrompts()
{ {
std::vector<HelpPrompt> prompts; std::vector<HelpPrompt> prompts;

View file

@ -12,6 +12,7 @@ public:
bool input(InputConfig* config, Input input) override; bool input(InputConfig* config, Input input) override;
void onSizeChanged() override; void onSizeChanged() override;
std::vector<HelpPrompt> getHelpPrompts() override; std::vector<HelpPrompt> getHelpPrompts() override;
HelpStyle getHelpStyle() override;
private: private:
void addEntry(const char* name, unsigned int color, bool add_arrow, const std::function<void()>& func); void addEntry(const char* name, unsigned int color, bool add_arrow, const std::function<void()>& func);

View file

@ -49,6 +49,13 @@ bool GuiSettings::input(InputConfig* config, Input input)
return GuiComponent::input(config, input); return GuiComponent::input(config, input);
} }
HelpStyle GuiSettings::getHelpStyle()
{
HelpStyle style = HelpStyle();
style.applyTheme(ViewController::get()->getState().getSystem()->getTheme(), "system");
return style;
}
std::vector<HelpPrompt> GuiSettings::getHelpPrompts() std::vector<HelpPrompt> GuiSettings::getHelpPrompts()
{ {
std::vector<HelpPrompt> prompts = mMenu.getHelpPrompts(); std::vector<HelpPrompt> prompts = mMenu.getHelpPrompts();

View file

@ -1,5 +1,6 @@
#include "GuiComponent.h" #include "GuiComponent.h"
#include "components/MenuComponent.h" #include "components/MenuComponent.h"
#include "SystemData.h"
// This is just a really simple template for a GUI that calls some save functions when closed. // This is just a really simple template for a GUI that calls some save functions when closed.
class GuiSettings : public GuiComponent class GuiSettings : public GuiComponent
@ -15,6 +16,7 @@ public:
bool input(InputConfig* config, Input input) override; bool input(InputConfig* config, Input input) override;
std::vector<HelpPrompt> getHelpPrompts() override; std::vector<HelpPrompt> getHelpPrompts() override;
HelpStyle getHelpStyle() override;
private: private:
MenuComponent mMenu; MenuComponent mMenu;