MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / OptionsMenu

Method OptionsMenu

game/ui/general/optionsmenu.cpp:16–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14{
15
16OptionsMenu::OptionsMenu() : Stage(), menuform(ui().getForm("options"))
17{
18 auto options = config().getOptions();
19 auto listbox = menuform->findControlTyped<ListBox>("LISTBOX_OPTIONS");
20 for (auto &section : options)
21 {
22 if (!section.first.empty())
23 {
24 listbox->addItem(mksp<TextButton>(section.first, ui().getFont("smalfont")));
25 for (auto &opt : section.second)
26 {
27 listbox->addItem(createOptionRow(opt));
28 }
29 }
30 }
31}
32
33OptionsMenu::~OptionsMenu() = default;
34

Callers

nothing calls this directly

Calls 5

emptyMethod · 0.80
getFormMethod · 0.45
getOptionsMethod · 0.45
addItemMethod · 0.45
getFontMethod · 0.45

Tested by

no test coverage detected