diff --git a/client/src/ui/boot_sequence.cpp b/client/src/ui/boot_sequence.cpp index e0b458a..46c97e2 100644 --- a/client/src/ui/boot_sequence.cpp +++ b/client/src/ui/boot_sequence.cpp @@ -36,6 +36,8 @@ bool BootSequence::is_finished(void) { } void BootSequence::render(UIRenderer* ui_renderer) { + ui_renderer->begin_text(); + const Color text_color = { 0.9f, 0.9f, 0.9f }; /* grey/white */ const float line_height = 18.0f; const float padding = 15.0f; @@ -51,4 +53,6 @@ void BootSequence::render(UIRenderer* ui_renderer) { float y_pos = padding + (i*line_height); ui_renderer->render_text(_messages[i].c_str(), padding, y_pos, text_color); } + + ui_renderer->flush_text(); } diff --git a/client/src/ui/main_menu.cpp b/client/src/ui/main_menu.cpp index a5f8e38..5cc8809 100644 --- a/client/src/ui/main_menu.cpp +++ b/client/src/ui/main_menu.cpp @@ -95,7 +95,13 @@ Screen MainMenu::update(void) { } void MainMenu::render(UIRenderer* ui_renderer) { + /* Pass 1: Background text. */ + ui_renderer->begin_text(); _render_background(ui_renderer); + ui_renderer->flush_text(); + + /* Pass 2: Buttons. */ + ui_renderer->begin_text(); /* Button colours. */ const Color button_color = { 0.1f, 0.15f, 0.2f }; @@ -117,6 +123,8 @@ void MainMenu::render(UIRenderer* ui_renderer) { float text_x = button.rect.x + (button.rect.w - text_width) / 2.0f; ui_renderer->render_text(button.label.c_str(), text_x, button.rect.y + 32, text_color); } + + ui_renderer->flush_text(); } void MainMenu::_update_background(void) {