Show a combat icon when in combat.

This commit is contained in:
Zed A. Shaw 2026-05-27 13:21:35 -04:00
parent dc9f942912
commit e4d6bf4854
3 changed files with 11 additions and 5 deletions

View file

@ -31,6 +31,11 @@
"hp_status_00": "assets/sounds/hp_status_00.ogg"
},
"sprites": {
"combat_active":
{"path": "assets/sprites/combat_active.png",
"frame_width": 170,
"frame_height": 170
},
"burning_animation":
{"path": "assets/sprites/burning_animation.png",
"frame_width": 256,

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

View file

@ -414,7 +414,11 @@ namespace gui {
}
break;
case eGUI::COMBAT_START:
// TODO: $main_ui.show_combat();
$main_ui.show_combat();
break;
case eGUI::COMBAT_STOP: // BUG: should these combine?
case eGUI::NO_NEIGHBORS:
$main_ui.close_combat();
break;
case eGUI::ENTITY_SPAWN: {
auto& sprite = world->get<components::Sprite>(entity);
@ -422,9 +426,6 @@ namespace gui {
$main_ui.dirty();
run_systems();
} break;
case eGUI::NO_NEIGHBORS:
event(Event::COMBAT_STOP);
break;
case eGUI::LOOT_CLOSE:
// BUG: need to resolve GUI events vs. FSM events better
event(Event::LOOT_OPEN);