ES-DE/es-app/src/guis/GuiSettings.h
Aloshi bc72990f39 Changed 'emulationstation' folder to 'es-app' because I forgot executables don't have extensions on Linux
Half of the ES code has been missing for 5 days because I am incompetent
2014-06-25 12:02:36 -05:00

22 lines
813 B
C++

#include "GuiComponent.h"
#include "components/MenuComponent.h"
// This is just a really simple template for a GUI that calls some save functions when closed.
class GuiSettings : public GuiComponent
{
public:
GuiSettings(Window* window, const char* title);
virtual ~GuiSettings(); // just calls save();
void save();
inline void addRow(const ComponentListRow& row) { mMenu.addRow(row); };
inline void addWithLabel(const std::string& label, const std::shared_ptr<GuiComponent>& comp) { mMenu.addWithLabel(label, comp); };
inline void addSaveFunc(const std::function<void()>& func) { mSaveFuncs.push_back(func); };
bool input(InputConfig* config, Input input) override;
std::vector<HelpPrompt> getHelpPrompts() override;
private:
MenuComponent mMenu;
std::vector< std::function<void()> > mSaveFuncs;
};