diff options
| author | Ray <[email protected]> | 2021-08-25 00:22:16 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2021-08-25 00:22:16 +0200 |
| commit | 913f185f82028c906fd65242c4375d97b8d0c919 (patch) | |
| tree | ae60155c481619aa84fc439f2e716fe53fbf7319 /examples/text/text_rectangle_bounds.c | |
| parent | 6575d31379045f34fa7d23b79d9adea2f18899e5 (diff) | |
| download | raylib-913f185f82028c906fd65242c4375d97b8d0c919.tar.gz raylib-913f185f82028c906fd65242c4375d97b8d0c919.zip | |
Renamed some static functions for more consistent naming
Diffstat (limited to 'examples/text/text_rectangle_bounds.c')
| -rw-r--r-- | examples/text/text_rectangle_bounds.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/examples/text/text_rectangle_bounds.c b/examples/text/text_rectangle_bounds.c index c763fb2e..0da1a8ab 100644 --- a/examples/text/text_rectangle_bounds.c +++ b/examples/text/text_rectangle_bounds.c @@ -13,8 +13,8 @@ #include "raylib.h" -static void DrawTextRec(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint); // Draw text using font inside rectangle limits -static void DrawTextRecEx(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint, int selectStart, int selectLength, Color selectTint, Color selectBackTint); // Draw text using font inside rectangle limits with support for text selection +static void DrawTextBoxed(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint); // Draw text using font inside rectangle limits +static void DrawTextBoxedSelectable(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint, int selectStart, int selectLength, Color selectTint, Color selectBackTint); // Draw text using font inside rectangle limits with support for text selection // Main entry point int main(void) @@ -92,14 +92,12 @@ tempor incididunt ut labore et dolore magna aliqua. Nec ullamcorper sit amet ris ClearBackground(RAYWHITE); - DrawRectangleLinesEx(container, 3, borderColor); // Draw container border + DrawRectangleLinesEx(container, 3, borderColor); // Draw container border // Draw text in container (add some padding) - DrawTextRec(font, text, - (Rectangle){ container.x + 4, container.y + 4, container.width - 4, container.height - 4 }, - 20.0f, 2.0f, wordWrap, GRAY); + DrawTextBoxed(font, text, (Rectangle){ container.x + 4, container.y + 4, container.width - 4, container.height - 4 }, 20.0f, 2.0f, wordWrap, GRAY); - DrawRectangleRec(resizer, borderColor); // Draw the resize box + DrawRectangleRec(resizer, borderColor); // Draw the resize box // Draw bottom info DrawRectangle(0, screenHeight - 54, screenWidth, 54, GRAY); @@ -130,13 +128,13 @@ tempor incididunt ut labore et dolore magna aliqua. Nec ullamcorper sit amet ris //-------------------------------------------------------------------------------------- // Draw text using font inside rectangle limits -static void DrawTextRec(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint) +static void DrawTextBoxed(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint) { - DrawTextRecEx(font, text, rec, fontSize, spacing, wordWrap, tint, 0, 0, WHITE, WHITE); + DrawTextBoxedSelectable(font, text, rec, fontSize, spacing, wordWrap, tint, 0, 0, WHITE, WHITE); } // Draw text using font inside rectangle limits with support for text selection -static void DrawTextRecEx(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint, int selectStart, int selectLength, Color selectTint, Color selectBackTint) +static void DrawTextBoxedSelectable(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint, int selectStart, int selectLength, Color selectTint, Color selectBackTint) { int length = TextLength(text); // Total length in bytes of the text, scanned by codepoints in loop |
