summaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-01-01 22:03:10 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2024-01-01 22:03:10 +0000
commit423328de708ffa93961c329de13445ce2da6e328 (patch)
tree6b4500d0d6af5ee5bff967233d82bfae078b279c /ui
parentRemove more use of legacy types from camera controller (diff)
downloadilt-423328de708ffa93961c329de13445ce2da6e328.tar.bz2
ilt-423328de708ffa93961c329de13445ce2da6e328.tar.xz
ilt-423328de708ffa93961c329de13445ce2da6e328.zip
Remove more use of legacy types and unnecessary pointers from selectable interface
Diffstat (limited to 'ui')
-rw-r--r--ui/gameMainSelector.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/ui/gameMainSelector.cpp b/ui/gameMainSelector.cpp
index a451ee1..703cfab 100644
--- a/ui/gameMainSelector.cpp
+++ b/ui/gameMainSelector.cpp
@@ -73,11 +73,10 @@ GameMainSelector::handleInput(const SDL_Event & e, const Position & parentPos)
void
GameMainSelector::defaultClick(const Ray & ray)
{
- Position2D baryPos {};
- float distance {};
+ BaryPosition baryPos {};
+ RelativeDistance distance {};
- if (const auto selected
- = gameState->world.applyOne<Selectable>(&Selectable::intersectRay, ray, &baryPos, &distance);
+ if (const auto selected = gameState->world.applyOne<Selectable>(&Selectable::intersectRay, ray, baryPos, distance);
selected != gameState->world.end()) {
const auto & ref = *selected.base()->get();
clicked = typeid(ref).name();