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

Method finish

game/ui/general/cheatoptions.cpp:86–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84void CheatOptions::resume() {}
85
86void CheatOptions::finish()
87{
88 /* Store persistent options */
89
90 config().set("OpenApoc.Cheat.InfiniteAmmo",
91 menuform->findControlTyped<CheckBox>("CHECKBOX_INFINITE_AMMO")->isChecked());
92
93 for (auto &desc : multiplierDescriptors)
94 {
95 auto bar = menuform->findControlTyped<ScrollBar>(desc.controlName);
96 config().set(desc.optionName,
97 scaleScrollbarToMultiplier(bar->getValue(), desc.multMin, desc.multMax,
98 bar->getMinimum(), bar->getMaximum()));
99 }
100}
101
102void CheatOptions::eventOccurred(Event *e)
103{

Callers

nothing calls this directly

Calls 5

isCheckedMethod · 0.80
getMinimumMethod · 0.80
getMaximumMethod · 0.80
setMethod · 0.45
getValueMethod · 0.45

Tested by

no test coverage detected