diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-31 23:49:18 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-31 23:49:18 +0100 |
commit | e38dfcc15401b48b5424834ba730d1d229ed9c6a (patch) | |
tree | 54794533468eaf34a11498a200a4a9d3eac05422 /editor/editor.hpp | |
parent | 6995e12e188f9a76b680f685a5ff4b6a4c2792e6 (diff) |
a
Diffstat (limited to 'editor/editor.hpp')
-rw-r--r-- | editor/editor.hpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/editor/editor.hpp b/editor/editor.hpp index a56e1fdb..460bb8c8 100644 --- a/editor/editor.hpp +++ b/editor/editor.hpp @@ -85,7 +85,9 @@ struct editor final tile_editor* current() noexcept; const tile_editor* current() const noexcept; - void on_click(world& world, global_coords pos, int mods); + enum class button : std::uint8_t { none, place, remove, }; + + void on_click(world& world, global_coords pos, int mods, button b); void on_mouse_move(world& world, global_coords& pos, int modifiers); void on_release(); @@ -107,6 +109,7 @@ private: struct drag_pos final { global_coords coord; snap_mode snap = snap_mode::none; + button btn; }; std::optional<drag_pos> _last_pos; editor_mode _mode = editor_mode::none; |