| 54 | multMin; |
| 55 | } |
| 56 | void 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 | |
| 72 | void CheatOptions::updateMultiplierText(UString controlName, float multMin, float multMax) |
| 73 | { |
nothing calls this directly
no test coverage detected