The enabled state of all modules is now preserved

This commit is contained in:
Ryzerth
2021-07-10 00:28:56 +02:00
parent fd9f4ebdc3
commit 73bbd69e3f
3 changed files with 48 additions and 16 deletions

View File

@ -106,6 +106,7 @@ bool Menu::draw(bool updateStates) {
bool enabled = item.inst->isEnabled();
if (ImGui::Checkbox(("##_menu_checkbox_" + opt.name).c_str(), &enabled)) {
enabled ? item.inst->enable() : item.inst->disable();
changed = true;
}
ImGui::SetCursorPos(pos);
}
@ -127,6 +128,7 @@ bool Menu::draw(bool updateStates) {
bool enabled = item.inst->isEnabled();
if (ImGui::Checkbox(("##_menu_checkbox_" + opt.name).c_str(), &enabled)) {
enabled ? item.inst->enable() : item.inst->disable();
changed = true;
}
ImGui::SetCursorPos(pos);