summaryrefslogtreecommitdiffhomepage
path: root/editor/editor.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-10-23 04:40:15 +0200
committerStanislaw Halik <sthalik@misaki.pl>2023-10-23 04:40:15 +0200
commit630e16296276eacec4fea22519b8610b88847a1a (patch)
tree61de3c427a459cd6d303b4c4654edf25e1e85575 /editor/editor.cpp
parent264c759ce2cdc53df28248394f40400d6dcf9ace (diff)
fix snap-drag tile display
Diffstat (limited to 'editor/editor.cpp')
-rw-r--r--editor/editor.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/editor/editor.cpp b/editor/editor.cpp
index 028e02fe..a1561081 100644
--- a/editor/editor.cpp
+++ b/editor/editor.cpp
@@ -89,6 +89,14 @@ void editor::on_mouse_move(world& world, global_coords& pos, int mods)
on_release();
}
+Optional<global_coords> editor::mouse_drag_pos()
+{
+ if (_last_pos)
+ return _last_pos->draw_coord;
+ else
+ return NullOpt;
+}
+
void editor::on_click_(world& world, global_coords pos, button b)
{
// todo make template