diff options
| author | raysan5 <[email protected]> | 2020-12-24 13:26:30 +0100 |
|---|---|---|
| committer | raysan5 <[email protected]> | 2020-12-24 13:26:30 +0100 |
| commit | 83ab2cb01746a869b625c9d84fbb4737146b73a9 (patch) | |
| tree | 010b0794848d863916e5acb4f766ea9e7ecb6e90 /examples/web/text/text_rectangle_bounds.c | |
| parent | d11274dcfcb0f349fba16ab4b83d2b96bcac8d1a (diff) | |
| download | raylib.com-83ab2cb01746a869b625c9d84fbb4737146b73a9.tar.gz raylib.com-83ab2cb01746a869b625c9d84fbb4737146b73a9.zip | |
Updated Web examples to raylib 3.5
Diffstat (limited to 'examples/web/text/text_rectangle_bounds.c')
| -rw-r--r-- | examples/web/text/text_rectangle_bounds.c | 12 |
1 files changed, 7 insertions, 5 deletions
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(); //---------------------------------------------------------------------------------- |
