diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2023-02-24 10:54:58 +0100 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-02-24 11:00:57 +0100 |
| commit | 321b394c397f826dbbda6e617aece10e732daadc (patch) | |
| tree | 224da7e085ced9773ab86128b9249a01c7186623 /editor/update.cpp | |
| parent | e9311fe8a12d7834b0d910edd65eacc5e732a0ff (diff) | |
fix (?) wrong global_coords unsigned offset
Diffstat (limited to 'editor/update.cpp')
| -rw-r--r-- | editor/update.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/update.cpp b/editor/update.cpp index 3c8f45fe..161f6869 100644 --- a/editor/update.cpp +++ b/editor/update.cpp @@ -58,7 +58,7 @@ void app::do_mouse_up_down(std::uint8_t button, bool is_down, int mods) default: case editor_mode::none: if (button == mouse_button_left) - if (auto* s = find_clickable_scenery(*cursor.pixel)) + if (auto* s = find_clickable_scenery(*cursor.pixel); s && s->item.can_activate(s->atlas)) return (void)s->item.activate(s->atlas); break; case editor_mode::floor: @@ -164,7 +164,7 @@ void app::update(float dt) do_camera(dt, keys, get_key_modifiers()); clear_non_repeated_keys(); - if ([[maybe_unused]] clickable_scenery* s = find_clickable_scenery(cursor.pixel)) + 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(); |
