MCPcopy Create free account
hub / github.com/Aloshi/EmulationStation / populateList

Method populateList

src/components/GuiMenu.cpp:69–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69void GuiMenu::populateList()
70{
71 mList->clear();
72
73 //if you want to add your own commands to the menu, here is where you need to change!
74 //commands added here are called with system() when selected (so are executed as shell commands)
75 //the method is GuiList::addObject(std::string displayString, std::string commandString, unsigned int displayHexColor);
76 //the list will automatically adjust as items are added to it, this should be the only area you need to change
77 //if you want to do something special within ES, override your command in the executeComand() method
78
79 mList->addObject("Settings", "es_settings", 0x0000FFFF);
80
81 mList->addObject("Restart", "sudo shutdown -r now", 0x0000FFFF);
82 mList->addObject("Shutdown", "sudo shutdown -h now", 0x0000FFFF);
83
84 mList->addObject("Reload", "es_reload", 0x0000FFFF);
85
86 if(!Settings::getInstance()->getBool("DONTSHOWEXIT"))
87 mList->addObject("Exit", "exit", 0xFF0000FF); //a special case; pushes an SDL quit event to the event stack instead of being called by system()
88}
89
90void GuiMenu::update(int deltaTime)
91{

Callers

nothing calls this directly

Calls 3

addObjectMethod · 0.80
getBoolMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected