From 630e16296276eacec4fea22519b8610b88847a1a Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 23 Oct 2023 04:40:15 +0200 Subject: fix snap-drag tile display --- editor/editor.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'editor/editor.cpp') 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 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 -- cgit v1.2.3