From 427f50fa45d7015bd443fa2c0d059593c826d43f Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 16 Dec 2025 23:40:36 +0800 Subject: improve tests --- tests/projects/android/native_app/raylib_basic/src/main.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'tests/projects/android/native_app/raylib_basic') diff --git a/tests/projects/android/native_app/raylib_basic/src/main.cpp b/tests/projects/android/native_app/raylib_basic/src/main.cpp index b160499b7..0094d9e3c 100644 --- a/tests/projects/android/native_app/raylib_basic/src/main.cpp +++ b/tests/projects/android/native_app/raylib_basic/src/main.cpp @@ -12,7 +12,18 @@ int main(int argc, char** argv) { while (!WindowShouldClose()) { BeginDrawing(); ClearBackground(BLACK); - DrawText("Hello, xmake for raylib android!", 250, 250, 25, BLUE); + + // Draw FPS + const char* fpsText = TextFormat("%2i FPS", GetFPS()); + int fpsWidth = MeasureText(fpsText, 40); + DrawText(fpsText, GetScreenWidth() / 2 - fpsWidth / 2, 30, 40, GREEN); + + // Draw centered text + int fontSize = 50; + const char* text = "Hello, xmake for raylib android!"; + int textWidth = MeasureText(text, fontSize); + DrawText(text, GetScreenWidth() / 2 - textWidth / 2, 100, fontSize, BLUE); + EndDrawing(); } -- cgit v1.3.1