diff options
author | Aki <please@ignore.pl> | 2023-05-04 00:07:51 +0200 |
---|---|---|
committer | Aki <please@ignore.pl> | 2024-04-05 19:41:19 +0200 |
commit | 52b0bdaba5b38790d144bf1e800ea34be937ded0 (patch) | |
tree | c2215cb7848e421b9c96fcc5cf4beb83b3a75c97 /kurator | |
parent | 61d16477b01bcfbe8c3a481a232658ac60309f57 (diff) | |
download | kurator-52b0bdaba5b38790d144bf1e800ea34be937ded0.zip kurator-52b0bdaba5b38790d144bf1e800ea34be937ded0.tar.gz kurator-52b0bdaba5b38790d144bf1e800ea34be937ded0.tar.bz2 |
Refactored Actions to be owned by registry
Registry is now also responsible for switching between the actions and
each action is expected to have one system. Technically an std::variant
could be used here, but let's wait a bit and see how this part evolves.
Diffstat (limited to 'kurator')
-rw-r--r-- | kurator/src/inspect.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/kurator/src/inspect.cpp b/kurator/src/inspect.cpp index ab52bb8..d49a917 100644 --- a/kurator/src/inspect.cpp +++ b/kurator/src/inspect.cpp @@ -54,6 +54,7 @@ InspectionWindow::show() inspect<sim::FloatingMovement>(*it); inspect<sim::HitPoints>(*it); inspect<sim::AIShip>(*it); + inspect<sim::KeepAtRange>(*it); inspect<sim::Turret>(*it); inspect<TurretVisuals>(*it); inspect<AIVisuals>(*it); @@ -184,6 +185,14 @@ inspect(entt::handle&, sim::AIShip& ai) template <> void +inspect(entt::handle&, sim::KeepAtRange& action) +{ + ImGui::InputDouble("Keep At Range", &action.distance, 0, 0, "%.1f"); +} + + +template <> +void inspect(entt::handle&, AIVisuals& visuals) { ImGui::Checkbox("Show Target", &visuals.show_target); |