diff options
Diffstat (limited to 'examples/text_format_text.c')
| -rw-r--r-- | examples/text_format_text.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/examples/text_format_text.c b/examples/text_format_text.c index b9034b46..516e3ecf 100644 --- a/examples/text_format_text.c +++ b/examples/text_format_text.c @@ -17,16 +17,16 @@ int main() //-------------------------------------------------------------------------------------- int screenWidth = 800; int screenHeight = 450; - + InitWindow(screenWidth, screenHeight, "raylib [text] example - text formatting"); - + int score = 100020; int hiscore = 200450; int lives = 5; - + SetTargetFPS(60); //-------------------------------------------------------------------------------------- - + // Main game loop while (!WindowShouldClose()) // Detect window close button or ESC key { @@ -34,21 +34,21 @@ int main() //---------------------------------------------------------------------------------- // TODO: Update your variables here //---------------------------------------------------------------------------------- - + // Draw //---------------------------------------------------------------------------------- BeginDrawing(); - + ClearBackground(RAYWHITE); - + DrawText(FormatText("Score: %08i", score), 200, 80, 20, RED); - + DrawText(FormatText("HiScore: %08i", hiscore), 200, 120, 20, GREEN); - + DrawText(FormatText("Lives: %02i", lives), 200, 160, 40, BLUE); - + DrawText(FormatText("Elapsed Time: %02.02f ms", GetFrameTime()*1000), 200, 220, 20, BLACK); - + EndDrawing(); //---------------------------------------------------------------------------------- } @@ -57,6 +57,6 @@ int main() //-------------------------------------------------------------------------------------- CloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- - + return 0; }
\ No newline at end of file |
