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_rectangle_bounds.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'examples/web/text/text_rectangle_bounds.c') diff --git a/examples/web/text/text_rectangle_bounds.c b/examples/web/text/text_rectangle_bounds.c index ffe7f2c..a0f14f5 100644 --- a/examples/web/text/text_rectangle_bounds.c +++ b/examples/web/text/text_rectangle_bounds.c @@ -68,7 +68,7 @@ int main(void) font = GetFontDefault(); // Get default system font #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 //-------------------------------------------------------------------------------------- @@ -142,15 +142,17 @@ void UpdateDrawFrame(void) DrawRectangleRec(resizer, borderColor); // Draw the resize box - // Draw info + // Draw bottom info + DrawRectangle(0, screenHeight - 54, screenWidth, 54, GRAY); + DrawRectangleRec((Rectangle){ 382, screenHeight - 34, 12, 12 }, MAROON); + DrawText("Word Wrap: ", 313, screenHeight-115, 20, BLACK); if (wordWrap) DrawText("ON", 447, screenHeight - 115, 20, RED); else DrawText("OFF", 447, screenHeight - 115, 20, BLACK); - DrawText("Press [SPACE] to toggle word wrap", 218, screenHeight - 91, 20, GRAY); + + DrawText("Press [SPACE] to toggle word wrap", 218, screenHeight - 86, 20, GRAY); - DrawRectangle(0, screenHeight - 54, screenWidth, 54, GRAY); DrawText("Click hold & drag the to resize the container", 155, screenHeight - 38, 20, RAYWHITE); - DrawRectangleRec((Rectangle){ 382, screenHeight - 34, 12, 12 }, MAROON); EndDrawing(); //---------------------------------------------------------------------------------- -- cgit v1.2.3