From 1f14089d0d6adbd1072b022dfaeb17a1975e8b38 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 19 Mar 2025 01:44:18 +0000 Subject: Replace basic query tool with a ImGui version --- ui/gameMainSelector.cpp | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) (limited to 'ui/gameMainSelector.cpp') diff --git a/ui/gameMainSelector.cpp b/ui/gameMainSelector.cpp index d5cbf62..55977ed 100644 --- a/ui/gameMainSelector.cpp +++ b/ui/gameMainSelector.cpp @@ -1,5 +1,4 @@ #include "gameMainSelector.h" -#include "collection.h" #include "text.h" #include "ui/uiComponent.h" #include @@ -8,9 +7,7 @@ #include #include // IWYU pragma: keep #include -#include #include -#include const std::filesystem::path fontpath {"/usr/share/fonts/hack/Hack-Regular.ttf"}; @@ -27,9 +24,6 @@ GameMainSelector::render(const UIShader & shader, const Position & parentPos) co if (target) { target->render(shader, parentPos + position + TargetPos); } - if (!clicked.empty()) { - Text {clicked, font, {{50, 10}, {0, 15}}, {1, 1, 0}}.render(shader, parentPos); - } } void @@ -73,22 +67,8 @@ GameMainSelector::handleInput(const SDL_Event & e, const Position & parentPos) } void -GameMainSelector::defaultClick(const Ray & ray) +GameMainSelector::defaultClick(const Ray &) { - BaryPosition baryPos {}; - RelativeDistance distance {}; - - if (const auto selected = gameState->world.applyOne(&Selectable::intersectRay, ray, baryPos, distance); - selected != gameState->world.end()) { - const auto & ref = *selected.base()->get(); - clicked = typeid(ref).name(); - } - else if (const auto pos = gameState->terrain->intersectRay(ray)) { - clicked = streamed_string(*pos); - } - else { - clicked.clear(); - } } bool -- cgit v1.2.3