diff options
| author | Ray <[email protected]> | 2021-06-22 21:24:15 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2021-06-22 21:24:15 +0200 |
| commit | 49d2897b2480fa7f66405b326c1b8d01ff6ee2d8 (patch) | |
| tree | 21427c74fdee7751aaef8b1de18330fe289d8e35 | |
| parent | 6f60622619ed3b2606cc186d9d87cfe15e665e75 (diff) | |
| download | raylib-49d2897b2480fa7f66405b326c1b8d01ff6ee2d8.tar.gz raylib-49d2897b2480fa7f66405b326c1b8d01ff6ee2d8.zip | |
Update core_custom_frame_control.c
| -rw-r--r-- | examples/core/core_custom_frame_control.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/examples/core/core_custom_frame_control.c b/examples/core/core_custom_frame_control.c index c1290abf..a3306d13 100644 --- a/examples/core/core_custom_frame_control.c +++ b/examples/core/core_custom_frame_control.c @@ -66,9 +66,7 @@ int main(void) if (!pause) { position += 200*deltaTime; // We move at 200 pixels per second - if (position >= GetScreenWidth()) position = 0; - timeCounter += deltaTime; // We count time (seconds) } //---------------------------------------------------------------------------------- @@ -87,7 +85,8 @@ int main(void) DrawText(FormatText("PosX: %03.0f", position), position - 50, GetScreenHeight()/2 + 40, 20, BLACK); DrawText("Circle is moving at a constant 200 pixels/sec,\nindependently of the frame rate.", 10, 10, 20, DARKGRAY); - DrawText("PRESS SPACE to PAUSE MOVEMENT", 10, GetScreenHeight() - 30, 20, GRAY); + DrawText("PRESS SPACE to PAUSE MOVEMENT", 10, GetScreenHeight() - 60, 20, GRAY); + DrawText("PRESS UP | DOWN to CHANGE TARGET FPS", 10, GetScreenHeight() - 30, 20, GRAY); DrawText(FormatText("TARGET FPS: %i", targetFPS), GetScreenWidth() - 220, 10, 20, LIME); DrawText(FormatText("CURRENT FPS: %i", (int)(1.0f/deltaTime)), GetScreenWidth() - 220, 40, 20, GREEN); @@ -123,4 +122,4 @@ int main(void) //-------------------------------------------------------------------------------------- return 0; -}
\ No newline at end of file +} |
