From 25c604f1f2e50ea2cbabf3c5f9147dd57fd9dd44 Mon Sep 17 00:00:00 2001 From: Aki Date: Fri, 27 Jan 2023 17:46:28 +0100 Subject: Added informational tooltip for weapon selection --- kurator/src/ScenarioEditor.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/kurator/src/ScenarioEditor.cpp b/kurator/src/ScenarioEditor.cpp index 9b20a14..b573d54 100644 --- a/kurator/src/ScenarioEditor.cpp +++ b/kurator/src/ScenarioEditor.cpp @@ -152,6 +152,16 @@ loadout_editor(std::shared_ptr repo, campaign::Loadout& lo *it = type; changed = true; } + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::Text("Damage: %.0f", type.base_damage); + ImGui::Text("RoF: %.1fs", type.rate_of_fire); + ImGui::Text("Reload: %.1fs", type.reload); + ImGui::Text("Rounds: %d", type.rounds); + ImGui::Text("Optimal Range: %.0fm", type.optimal_range); + ImGui::Text("Effective Range: %.0fm", type.effective_range()); + ImGui::EndTooltip(); + } }); ImGui::EndCombo(); } -- cgit v1.1