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

@ -14,6 +14,10 @@ namespace gui {
$window.setFramerateLimit(FRAME_LIMIT);
}
void MainUI::dirty() {
$needs_render = true;
}
void MainUI::debug() {
auto& dbg = $level.world->get_the<Debug>();
dbg.FPS = !dbg.FPS;