diff options
-rw-r--r-- | kurator/src/ScenarioEditor.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/kurator/src/ScenarioEditor.cpp b/kurator/src/ScenarioEditor.cpp index ab4832b..b79dc14 100644 --- a/kurator/src/ScenarioEditor.cpp +++ b/kurator/src/ScenarioEditor.cpp @@ -99,12 +99,8 @@ groups_editor(std::shared_ptr<universe::Repository> repo, std::vector<Group>& gr ImGui::SameLine(); changed |= loadout_editor(repo, it->loadout); changed |= removed; - changed |= ImGui::SliderInt("Team 1", &it->counts[0], 0, 10); // yeah no - changed |= ImGui::SliderInt("Team 2", &it->counts[1], 0, 10); - changed |= ImGui::SliderInt("Team 3", &it->counts[2], 0, 10); - changed |= ImGui::SliderInt("Team 4", &it->counts[3], 0, 10); - changed |= ImGui::SliderInt("Team 5", &it->counts[4], 0, 10); - changed |= ImGui::SliderInt("Team 6", &it->counts[5], 0, 10); + for (auto jt = it->counts.begin(); jt != it->counts.end(); ++jt) + changed |= ImGui::SliderInt(TextFormat("Team %d", jt - it->counts.begin() + 1), &(*jt), 0, 10); it = removed ? groups.erase(it) : std::next(it); ImGui::PopID(); } |