From 0d6a71b06fdbc7497265a5384cfca38183500eab Mon Sep 17 00:00:00 2001 From: "Zed A. Shaw" Date: Mon, 9 Jun 2025 22:18:13 -0400 Subject: [PATCH] Fixed a couple little bugs in the state so now can refactor out the dnd code. --- gui/fsm.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gui/fsm.cpp b/gui/fsm.cpp index 1db8924..e67dde8 100644 --- a/gui/fsm.cpp +++ b/gui/fsm.cpp @@ -142,6 +142,7 @@ namespace gui { // BUG: need a cancel operation here $window.setMouseCursorVisible(true); $grab_source = std::nullopt; + state(State::LOOTING); } } break; case INV_SELECT: { @@ -184,7 +185,6 @@ namespace gui { void FSM::INV_GRAB(Event ev, std::any data) { using enum Event; - (void)data; switch(ev) { case LOOT_OPEN: @@ -214,6 +214,7 @@ namespace gui { // BUG: need a cancel operation here //$window.setMouseCursorVisible(true); $grab_source = std::nullopt; + state(State::LOOTING); } } break; case MOUSE_CLICK: @@ -253,8 +254,8 @@ namespace gui { state(State::IDLE); break; case LOOT_SELECT: - LOOT_GRAB(ev, data); state(State::LOOT_GRAB); + LOOT_GRAB(ev, data); break; case INV_SELECT: state(State::INV_GRAB);