Fixed a couple little bugs in the state so now can refactor out the dnd code.

master
Zed A. Shaw 4 weeks ago
parent 2a6b892e7f
commit 0d6a71b06f
  1. 5
      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);

Loading…
Cancel
Save