summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-12-26 03:48:30 +0100
committerAki <please@ignore.pl>2022-12-26 03:48:30 +0100
commite27a9ba4f7ab3b8937a9b36c432332698413d00a (patch)
treeb14a44aec0cfc7fd8e64ab407f4f66ad201d8d02
parent0f415a94e31f45fdba643e351e19798bbc6c2f20 (diff)
downloadkurator-e27a9ba4f7ab3b8937a9b36c432332698413d00a.zip
kurator-e27a9ba4f7ab3b8937a9b36c432332698413d00a.tar.gz
kurator-e27a9ba4f7ab3b8937a9b36c432332698413d00a.tar.bz2
Simplified sliders update check
-rw-r--r--kurator/src/ScenarioEditor.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/kurator/src/ScenarioEditor.cpp b/kurator/src/ScenarioEditor.cpp
index 23ff8ff..0b00b02 100644
--- a/kurator/src/ScenarioEditor.cpp
+++ b/kurator/src/ScenarioEditor.cpp
@@ -45,16 +45,11 @@ ScenarioEditor::update(float)
}
if (ImGui::Begin("Scenario Editor")) {
bool update = false;
- ImGui::SliderInt("Teams", &teams, 2, 6);
- update |= ImGui::IsItemEdited();
- ImGui::SliderInt("Anvils", &anvils, 0, 20);
- update |= ImGui::IsItemEdited();
- ImGui::SliderInt("Warbringers", &warbringers, 0, 20);
- update |= ImGui::IsItemEdited();
- ImGui::SliderInt("Eclipses", &eclipses, 0, 20);
- update |= ImGui::IsItemEdited();
- ImGui::SliderFloat("Distance", &distance, 10000, 20000);
- update |= ImGui::IsItemEdited();
+ update |= ImGui::SliderInt("Teams", &teams, 2, 6);
+ update |= ImGui::SliderInt("Anvils", &anvils, 0, 20);
+ update |= ImGui::SliderInt("Warbringers", &warbringers, 0, 20);
+ update |= ImGui::SliderInt("Eclipses", &eclipses, 0, 20);
+ update |= ImGui::SliderFloat("Distance", &distance, 10000, 20000);
if (update)
battle = std::make_shared<Battle>(session, scenario());
if (ImGui::Button("Start"))