diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2023-02-24 12:09:59 +0100 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-02-24 12:09:59 +0100 |
| commit | f5d7c6b5e21eed60c3787546de7d41c7440735db (patch) | |
| tree | d20d32a371d1d83a844120163677742901b26fc4 | |
| parent | bc345d44c814afcdfc0dc2a697860ba2073e52d4 (diff) | |
editor: fix cursor when in imgui
| -rw-r--r-- | editor/update.cpp | 13 |
1 files 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 |
