summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kurator/src/inspect.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/kurator/src/inspect.cpp b/kurator/src/inspect.cpp
index 8499e44..fa62010 100644
--- a/kurator/src/inspect.cpp
+++ b/kurator/src/inspect.cpp
@@ -122,11 +122,27 @@ inspect(entt::handle&, universe::ShipType& type)
}
+static bool
+slider_double(const char* label, double* value, double minimum, double maximum, const char* fmt)
+{
+ return ImGui::SliderScalar(label, ImGuiDataType_Double, value, &minimum, &maximum, fmt);
+}
+
+
template <>
void
inspect(entt::handle&, universe::TurretType& type)
{
- ImGui::Text("Type: %s", type.name.c_str());
+ ImGui::Text("Turret: %s", type.name.c_str());
+ ImGui::Text("DPS: %.1f", type.damage_per_second());
+ ImGui::Text("Eff. Range: %.1f", type.effective_range());
+ ImGui::SliderInt("Rounds", &type.rounds, 0, 50);
+ slider_double("Base Damage", &type.base_damage, 0, 1000.0, "%.1f");
+ slider_double("Rate of Fire", &type.rate_of_fire, 0, 60.0, "%.3f");
+ slider_double("Reload", &type.reload, 0, 60.0, "%.3f");
+ slider_double("Optimal Range", &type.optimal_range, 0, 30000.0, "%.1f");
+ slider_double("Falloff Modifier", &type.falloff_modifier, 0, 1.0, "%.3f");
+ slider_double("Falloff Intensity", &type.falloff_intensity, 0, 1.0, "%.3f");
}