Fixed a couple little bugs in the state so now can refactor out the dnd code.
This commit is contained in:
parent
2a6b892e7f
commit
0d6a71b06f
1 changed files with 3 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue