From af3568154aff0dd7aac29aae9d4357d315c25ddb Mon Sep 17 00:00:00 2001 From: "Zed A. Shaw" Date: Sun, 6 Jul 2025 11:36:30 -0400 Subject: [PATCH] Just had to grab the sprite, duh. Closes #3. --- gui/dnd_loot.cpp | 1 + gui/fsm.cpp | 8 -------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/gui/dnd_loot.cpp b/gui/dnd_loot.cpp index e4a8649..cabe9f3 100644 --- a/gui/dnd_loot.cpp +++ b/gui/dnd_loot.cpp @@ -219,6 +219,7 @@ namespace gui { auto gui_id = std::any_cast(data); if(auto source = gui.get_if(gui_id)) { + $grab_sprite = source->sprite; source->grab(); return gui_id; } else { diff --git a/gui/fsm.cpp b/gui/fsm.cpp index eb83da5..16503c9 100644 --- a/gui/fsm.cpp +++ b/gui/fsm.cpp @@ -136,12 +136,6 @@ namespace gui { void FSM::IDLE(Event ev, std::any data) { using enum Event; - auto& player_pos = System::player_position($level); - - fmt::println("AIMING AT: {},{}; POS: {},{}", - player_pos.aiming_at.x, player_pos.aiming_at.y, - player_pos.location.x, player_pos.location.y); - sound::stop("walk"); switch(ev) { @@ -387,8 +381,6 @@ 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); if(in_state(State::LOOTING)) $dnd_loot.render();