From 6a72d1160f416e6a0242ce3a7365fb01668e2d2f Mon Sep 17 00:00:00 2001 From: "Zed A. Shaw" Date: Mon, 23 Jun 2025 01:50:43 -0400 Subject: [PATCH] When things die you get their things. --- gui/dnd_loot.cpp | 2 ++ gui/fsm.cpp | 4 +++- main.cpp | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gui/dnd_loot.cpp b/gui/dnd_loot.cpp index 9a8c297..4ed7342 100644 --- a/gui/dnd_loot.cpp +++ b/gui/dnd_loot.cpp @@ -234,6 +234,8 @@ namespace gui { void DNDLoot::render() { if($grab_source && $grab_sprite) { $window.draw(*$grab_sprite); + } else { + dbc::log("nothing to render!"); } } diff --git a/gui/fsm.cpp b/gui/fsm.cpp index 8567f81..2469459 100644 --- a/gui/fsm.cpp +++ b/gui/fsm.cpp @@ -370,8 +370,10 @@ namespace gui { $status_ui.render($window); $combat_ui.render($window); + // BUG: no matter how I order this the dnd sprite renders behind the loot ui if($loot_ui.active) $loot_ui.render($window); - $dnd_loot.render(); + + if(in_state(State::LOOTING)) $dnd_loot.render(); if($map_open) { $map_ui.render($window, $main_ui.$compass_dir); diff --git a/main.cpp b/main.cpp index 559a8e1..006479f 100644 --- a/main.cpp +++ b/main.cpp @@ -31,7 +31,7 @@ int main(int argc, char* argv[]) { while(main.active()) { main.render(); - // ZED: need to sort out how to deal with this in the FSM + // BUG: need to sort out how to deal with this in the FSM if(main.in_state(gui::State::IDLE) || main.in_state(gui::State::NEXT_LEVEL) || main.in_state(gui::State::LOOTING)