aboutsummaryrefslogtreecommitdiff
path: root/examples/text/text_rectangle_bounds.c
diff options
context:
space:
mode:
authorRay <raysan5@gmail.com>2019-12-01 13:28:14 +0100
committerRay <raysan5@gmail.com>2019-12-01 13:28:14 +0100
commit3ffe34f9bb6452c021dfff0c2b04411542920c22 (patch)
tree7709985f319fa7d1c2d9a836b8536954a42c6436 /examples/text/text_rectangle_bounds.c
parent416a52b5bc6b1c0ec0d3acf4b86521a96f017811 (diff)
downloadraylib-3ffe34f9bb6452c021dfff0c2b04411542920c22.tar.gz
raylib-3ffe34f9bb6452c021dfff0c2b04411542920c22.zip
ADDED: DrawTextCodepoint()
- Renamed GetGlyphIndex() parameter - Review DrawTextEx() implementation - Review DrawTextRecEx() implementation
Diffstat (limited to 'examples/text/text_rectangle_bounds.c')
-rw-r--r--examples/text/text_rectangle_bounds.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/examples/text/text_rectangle_bounds.c b/examples/text/text_rectangle_bounds.c
index abfb142b..870561e1 100644
--- a/examples/text/text_rectangle_bounds.c
+++ b/examples/text/text_rectangle_bounds.c
@@ -22,9 +22,9 @@ int main(void)
InitWindow(screenWidth, screenHeight, "raylib [text] example - draw text inside a rectangle");
- const char text[] = "Text cannot escape\tthis container\t...word wrap also works when active so here's\
- a long text for testing.\n\nLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod\
- tempor incididunt ut labore et dolore magna aliqua. Nec ullamcorper sit amet risus nullam eget felis eget.";
+ const char text[] = "Text cannot escape\tthis container\t...word wrap also works when active so here's \
+a long text for testing.\n\nLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod \
+tempor incididunt ut labore et dolore magna aliqua. Nec ullamcorper sit amet risus nullam eget felis eget.";
bool resizing = false;
bool wordWrap = true;
@@ -97,16 +97,18 @@ int main(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();
//----------------------------------------------------------------------------------
}