From f5d7c6b5e21eed60c3787546de7d41c7440735db Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 24 Feb 2023 12:09:59 +0100 Subject: editor: fix cursor when in imgui --- editor/update.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/editor/update.cpp b/editor/update.cpp index 161f6869..0a9141f0 100644 --- a/editor/update.cpp +++ b/editor/update.cpp @@ -164,10 +164,15 @@ void app::update(float dt) do_camera(dt, keys, get_key_modifiers()); clear_non_repeated_keys(); - if (auto* s = find_clickable_scenery(cursor.pixel); s && s->item.can_activate(s->atlas)) - M->set_cursor(std::uint32_t(Cursor::Hand)); - else - set_cursor_from_imgui(); + if (!cursor.in_imgui) + { + auto* s = find_clickable_scenery(cursor.pixel); + + if (s && s->item.can_activate(s->atlas)) + M->set_cursor(std::uint32_t(Cursor::Hand)); + else + set_cursor_from_imgui(); + } } } // namespace floormat -- cgit v1.2.3