Just had to grab the sprite, duh. Closes #3.
This commit is contained in:
parent
1baf90a776
commit
af3568154a
2 changed files with 1 additions and 8 deletions
|
@ -219,6 +219,7 @@ namespace gui {
|
||||||
auto gui_id = std::any_cast<guecs::Entity>(data);
|
auto gui_id = std::any_cast<guecs::Entity>(data);
|
||||||
|
|
||||||
if(auto source = gui.get_if<guecs::GrabSource>(gui_id)) {
|
if(auto source = gui.get_if<guecs::GrabSource>(gui_id)) {
|
||||||
|
$grab_sprite = source->sprite;
|
||||||
source->grab();
|
source->grab();
|
||||||
return gui_id;
|
return gui_id;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -136,12 +136,6 @@ namespace gui {
|
||||||
void FSM::IDLE(Event ev, std::any data) {
|
void FSM::IDLE(Event ev, std::any data) {
|
||||||
using enum Event;
|
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");
|
sound::stop("walk");
|
||||||
|
|
||||||
switch(ev) {
|
switch(ev) {
|
||||||
|
@ -387,8 +381,6 @@ namespace gui {
|
||||||
|
|
||||||
$status_ui.render($window);
|
$status_ui.render($window);
|
||||||
$combat_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($loot_ui.active) $loot_ui.render($window);
|
||||||
|
|
||||||
if(in_state(State::LOOTING)) $dnd_loot.render();
|
if(in_state(State::LOOTING)) $dnd_loot.render();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue