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

Method begin

game/ui/general/cheatoptions.cpp:56–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54 multMin;
55}
56void CheatOptions::begin()
57{
58 menuform->findControlTyped<Label>("TEXT_FUNDS")->setText(state->getPlayerBalance());
59 menuform->findControlTyped<CheckBox>("CHECKBOX_INFINITE_AMMO")
60 ->setChecked(config().getBool("OpenApoc.Cheat.InfiniteAmmo"));
61
62 for (auto &desc : multiplierDescriptors)
63 {
64 auto bar = menuform->findControlTyped<ScrollBar>(desc.controlName);
65 bar->setValue(scaleMultiplierToScrollbar(config().getFloat(desc.optionName), desc.multMin,
66 desc.multMax, bar->getMinimum(),
67 bar->getMaximum()));
68 updateMultiplierText(desc.controlName, desc.multMin, desc.multMax);
69 }
70}
71
72void CheatOptions::updateMultiplierText(UString controlName, float multMin, float multMax)
73{

Callers

nothing calls this directly

Calls 8

getPlayerBalanceMethod · 0.80
getBoolMethod · 0.80
getFloatMethod · 0.80
getMinimumMethod · 0.80
getMaximumMethod · 0.80
setTextMethod · 0.45
setCheckedMethod · 0.45
setValueMethod · 0.45

Tested by

no test coverage detected