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

Method updateMultiplierText

game/ui/general/cheatoptions.cpp:72–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70}
71
72void CheatOptions::updateMultiplierText(UString controlName, float multMin, float multMax)
73{
74 auto bar = menuform->findControlTyped<ScrollBar>(controlName);
75 auto label = menuform->findControlTyped<Label>("TEXT_" + controlName);
76 label->setText(
77 format("%.0f%%", scaleScrollbarToMultiplier(bar->getValue(), multMin, multMax,
78 bar->getMinimum(), bar->getMaximum()) *
79 100));
80}
81
82void CheatOptions::pause() {}
83

Callers

nothing calls this directly

Calls 5

formatFunction · 0.85
getMinimumMethod · 0.80
getMaximumMethod · 0.80
setTextMethod · 0.45
getValueMethod · 0.45

Tested by

no test coverage detected