Add an ability to mark the main UI dirty so that it forces a render at specific times.

This commit is contained in:
Zed A. Shaw 2025-02-22 23:26:47 -05:00
parent b8bafdcab5
commit fa6311f10c
6 changed files with 20 additions and 8 deletions

View file

@ -79,6 +79,7 @@ namespace gui {
if(auto move_to = $main_ui.play_move()) {
System::plan_motion(*$level.world, *move_to);
run_systems();
$main_ui.dirty();
state(State::IDLE);
}
}
@ -172,6 +173,7 @@ namespace gui {
switch(ev) {
case ATTACK:
$main_ui.dirty();
$status_ui.log("You attack!");
state(State::ATTACKING);
break;