diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-24 16:53:57 +0100 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-24 16:53:57 +0100 |
| commit | e06df4dce05c8dd2ebd340ee1abcc8556f328d73 (patch) | |
| tree | 77d8abd10607d4b9454c92fe756331f02db4c5bc /editor | |
| parent | eb4922fc429764504a7e94e8c712c368c51685f2 (diff) | |
only show hand cursor over interactible scenery
Diffstat (limited to 'editor')
| -rw-r--r-- | editor/update.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/editor/update.cpp b/editor/update.cpp index 9f347f0d..15d99d39 100644 --- a/editor/update.cpp +++ b/editor/update.cpp @@ -125,7 +125,8 @@ void app::update(float dt) do_camera(dt, keys, get_key_modifiers()); clear_non_repeated_keys(); - if (!_editor.current_tile_editor() && cursor.tile && find_clickable_scenery(*cursor.pixel)) + if (clickable_scenery* s; + !_editor.current_tile_editor() && cursor.tile && (s = find_clickable_scenery(*cursor.pixel)) && s->item.can_activate()) M->set_cursor(std::uint32_t(Cursor::Hand)); else M->set_cursor(std::uint32_t(Cursor::Arrow)); |
