summaryrefslogtreecommitdiffhomepage
path: root/examples/text/text_unicode.c
diff options
context:
space:
mode:
authorRay <[email protected]>2021-08-25 00:22:16 +0200
committerRay <[email protected]>2021-08-25 00:22:16 +0200
commit913f185f82028c906fd65242c4375d97b8d0c919 (patch)
treeae60155c481619aa84fc439f2e716fe53fbf7319 /examples/text/text_unicode.c
parent6575d31379045f34fa7d23b79d9adea2f18899e5 (diff)
downloadraylib-913f185f82028c906fd65242c4375d97b8d0c919.tar.gz
raylib-913f185f82028c906fd65242c4375d97b8d0c919.zip
Renamed some static functions for more consistent naming
Diffstat (limited to 'examples/text/text_unicode.c')
-rw-r--r--examples/text/text_unicode.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/text/text_unicode.c b/examples/text/text_unicode.c
index 2954a28e..883d2a5c 100644
--- a/examples/text/text_unicode.c
+++ b/examples/text/text_unicode.c
@@ -133,8 +133,8 @@ struct {
//--------------------------------------------------------------------------------------
static void RandomizeEmoji(void); // Fills the emoji array with random emojis
-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
//--------------------------------------------------------------------------------------
// Global variables
@@ -273,7 +273,7 @@ int main(int argc, char **argv)
// Draw the main text message
Rectangle textRect = { msgRect.x + horizontalPadding/2, msgRect.y + verticalPadding/2, msgRect.width - horizontalPadding, msgRect.height };
- DrawTextRec(*font, messages[message].text, textRect, (float)font->baseSize, 1.0f, true, WHITE);
+ DrawTextBoxed(*font, messages[message].text, textRect, (float)font->baseSize, 1.0f, true, WHITE);
// Draw the info text below the main message
int size = (int)strlen(messages[message].text);
@@ -329,13 +329,13 @@ static void RandomizeEmoji(void)
//--------------------------------------------------------------------------------------
// 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