diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-01-15 11:41:27 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-01-16 15:43:15 +0000 |
commit | 92cba8dfe1034aa6fe7f2178183411a14efcd983 (patch) | |
tree | 761fb81db114d0b02348b1050e1a960a5e9412b8 /ui | |
parent | Process UI layers in reverse, so it's stack like (diff) | |
download | ilt-92cba8dfe1034aa6fe7f2178183411a14efcd983.tar.bz2 ilt-92cba8dfe1034aa6fe7f2178183411a14efcd983.tar.xz ilt-92cba8dfe1034aa6fe7f2178183411a14efcd983.zip |
We know the last param is distance now
Diffstat (limited to 'ui')
-rw-r--r-- | ui/gameMainWindow.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/gameMainWindow.cpp b/ui/gameMainWindow.cpp index b559341..f895a20 100644 --- a/ui/gameMainWindow.cpp +++ b/ui/gameMainWindow.cpp @@ -60,11 +60,11 @@ public: const auto mouse = glm::vec2 {e.button.x, e.button.y} / position.size; glm::vec2 baryPos {}; - float eh; + float distance; const auto ray = camera->unProject(mouse); - if (const auto selected - = gameState->world.applyOne<Selectable>(&Selectable::intersectRay, ray, &baryPos, &eh); + 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(); |