diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-20 17:16:53 +0100 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-20 17:16:53 +0100 |
| commit | 21e3324e9202c48b8f97e97ee78b9f308fe7e1b7 (patch) | |
| tree | f9dc38f39480579194217f74411a97278a6f5fe1 | |
| parent | 469ef7e7097ee6d48163247fe56a5b6a042ed10f (diff) | |
editor: fix cursor tile drawing
| -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 a1f5d807..e9207cf6 100644 --- a/editor/update.cpp +++ b/editor/update.cpp @@ -40,8 +40,8 @@ void app::maybe_initialize_chunk([[maybe_unused]] const chunk_coords& pos, [[may void app::do_mouse_move(int mods) { - if (auto [tile, b] = cursor.tile; b && !cursor.in_imgui) - _editor.on_mouse_move(M->world(), tile, mods); + if (cursor.tile && !cursor.in_imgui) + _editor.on_mouse_move(M->world(), *cursor.tile, mods); } void app::do_mouse_up_down(std::uint8_t button, bool is_down, int mods) |
