Make a little crossed swords combat indicator show up.

This commit is contained in:
Zed A. Shaw 2026-04-04 20:50:00 -04:00
parent 0f9777988d
commit f9346f3e87
6 changed files with 18 additions and 3 deletions

View file

@ -72,7 +72,7 @@
"frame_height": 341
},
"sequences": {
"idle": {"frames": [0, 1, 2], "durations": [25, 5, 20] }
"idle": {"frames": [0, 1, 2], "durations": [10, 5, 15] }
},
"transforms": {
"basic": {

View file

@ -95,6 +95,11 @@
{"path": "assets/stories/win_story.png",
"frame_width": 1280,
"frame_height": 720
},
"combat_active":
{"path": "assets/sprites/combat_active.png",
"frame_width": 170,
"frame_height": 170
}
},
"worldgen": {

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

View file

@ -282,10 +282,10 @@ namespace gui {
$systems.runPickup();
break;
case COMBAT_START:
fmt::println("!!!!!!!!!!!!!! COMBAT START in IDLE");
$main_ui.show_combat();
break;
case COMBAT_STOP:
fmt::println("!!!!!!!!!!!!!! COMBAT STOP in IDLE");
$main_ui.close_combat();
break;
default:
break; // ignore everything else

View file

@ -157,4 +157,12 @@ namespace gui {
$window.draw(*$hand.sprite);
}
}
void MainUI::show_combat() {
$overlay_ui.show_sprite("top_right", "combat_active");
}
void MainUI::close_combat() {
$overlay_ui.close_sprite("top_right");
}
}

View file

@ -51,5 +51,7 @@ namespace gui {
void play_hands();
bool hands_playing();
void render_hands();
void show_combat();
void close_combat();
};
}