Fix render issues with fonts

This commit is contained in:
Adolfo Reyna
2026-01-30 22:02:15 -05:00
parent e3445b545d
commit 436245a7a2
5 changed files with 30 additions and 17 deletions

View File

@@ -4,6 +4,7 @@
// Simple demo game to test the launcher
#include "demo_game.h"
#include "board_config.h"
#include <stdio.h>
#include <string.h>
@@ -53,7 +54,11 @@ void DemoGame::draw() {
// Instructions
if (tap_count < 3) {
#ifdef BUTTON_KEY0_PIN
renderer->draw_string(width/2 - 80, y + 80, "Tap or press 3 times", true);
#else
renderer->draw_string(width/2 - 80, y + 80, "Tap 3 times to exit", true);
#endif
} else {
renderer->draw_string(width/2 - 70, y + 80, "Exiting to menu...", true);
}

View File

@@ -220,12 +220,20 @@ void TicTacToeGame::draw() {
} else {
renderer->draw_string(20, 40, "TIE GAME!", true);
}
#ifdef BUTTON_KEY0_PIN
renderer->draw_string(20, 55, "Touch or KEY0 to restart", true);
#else
renderer->draw_string(20, 55, "Touch to restart", true);
#endif
} else {
char turn_text[30];
snprintf(turn_text, sizeof(turn_text), "Turn: %s", state.current_player == 1 ? "X" : "O");
renderer->draw_string(20, 40, turn_text, true);
#ifdef BUTTON_KEY0_PIN
renderer->draw_string(20, 55, "Touch cell or use keys", true);
#else
renderer->draw_string(20, 55, "Touch cell to play", true);
#endif
}
// Draw game board (use same layout as touch detection!)