summaryrefslogtreecommitdiffhomepage
path: root/editor/update.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-03-16 18:14:23 +0100
committerStanislaw Halik <sthalik@misaki.pl>2023-03-17 23:23:11 +0100
commit73fc95bc7bbdfe24e535f390f79d33fb809c0151 (patch)
treeef7f60cd9269907d79073450935647d4150698de /editor/update.cpp
parentd330637351e8ede605351787f17fb46324089535 (diff)
fix popup
Diffstat (limited to 'editor/update.cpp')
-rw-r--r--editor/update.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/editor/update.cpp b/editor/update.cpp
index 470e8b9f..7b3198ee 100644
--- a/editor/update.cpp
+++ b/editor/update.cpp
@@ -55,9 +55,7 @@ void app::do_mouse_up_down(std::uint8_t button, bool is_down, int mods)
update_cursor_tile(cursor.pixel);
if (is_down && !cursor.in_imgui)
- {
_popup_target = {};
- }
if (is_down && cursor.tile && !cursor.in_imgui)
{
@@ -74,7 +72,10 @@ void app::do_mouse_up_down(std::uint8_t button, bool is_down, int mods)
// TODO it should open on mouseup if still on the same item as on mousedown
else if (button == mouse_button_right)
if (auto* cl = find_clickable_scenery(*cursor.pixel))
+ {
+ _pending_popup = true;
_popup_target = { .e = cl->e, .target = popup_target_type::scenery, };
+ }
break;
case editor_mode::floor:
case editor_mode::walls: