From 83ab2cb01746a869b625c9d84fbb4737146b73a9 Mon Sep 17 00:00:00 2001 From: raysan5 Date: Thu, 24 Dec 2020 13:26:30 +0100 Subject: Updated Web examples to raylib 3.5 --- examples/web/text/text_format_text.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'examples/web/text/text_format_text.c') diff --git a/examples/web/text/text_format_text.c b/examples/web/text/text_format_text.c index 8896161..05664fb 100644 --- a/examples/web/text/text_format_text.c +++ b/examples/web/text/text_format_text.c @@ -40,7 +40,7 @@ int main(void) InitWindow(screenWidth, screenHeight, "raylib [text] example - text formatting"); #if defined(PLATFORM_WEB) - emscripten_set_main_loop(UpdateDrawFrame, 0, 1); + emscripten_set_main_loop(UpdateDrawFrame, 60, 1); #else SetTargetFPS(60); // Set our game to run at 60 frames-per-second //-------------------------------------------------------------------------------------- @@ -76,13 +76,13 @@ void UpdateDrawFrame(void) ClearBackground(RAYWHITE); - DrawText(FormatText("Score: %08i", score), 200, 80, 20, RED); + DrawText(TextFormat("Score: %08i", score), 200, 80, 20, RED); - DrawText(FormatText("HiScore: %08i", hiscore), 200, 120, 20, GREEN); + DrawText(TextFormat("HiScore: %08i", hiscore), 200, 120, 20, GREEN); - DrawText(FormatText("Lives: %02i", lives), 200, 160, 40, BLUE); + DrawText(TextFormat("Lives: %02i", lives), 200, 160, 40, BLUE); - DrawText(FormatText("Elapsed Time: %02.02f ms", GetFrameTime()*1000), 200, 220, 20, BLACK); + DrawText(TextFormat("Elapsed Time: %02.02f ms", GetFrameTime()*1000), 200, 220, 20, BLACK); EndDrawing(); //---------------------------------------------------------------------------------- -- cgit v1.2.3