Skip to content

Commit

Permalink
Update raygui.h
Browse files Browse the repository at this point in the history
  • Loading branch information
raysan5 committed Sep 7, 2023
1 parent e97226c commit 1af7a87
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/raygui.h
Original file line number Diff line number Diff line change
Expand Up @@ -4645,7 +4645,7 @@ const char **GetTextLines(const char *text, int *count)
}

// Get text width to next space for provided string
static int GetNextSpaceWidth(const char *text, int *nextSpaceIndex)
static float GetNextSpaceWidth(const char *text, int *nextSpaceIndex)
{
float width = 0;
int codepointByteCount = 0;
Expand All @@ -4670,7 +4670,7 @@ static int GetNextSpaceWidth(const char *text, int *nextSpaceIndex)
}
}

return (int)width;
return width;
}

// Gui draw text using default font
Expand Down Expand Up @@ -4800,7 +4800,7 @@ static void GuiDrawText(const char *text, Rectangle textBounds, int alignment, C
{
// Get width to next space in line
int nextSpaceIndex = 0;
int nextSpaceWidth = GetNextSpaceWidth(lines[i] + c, &nextSpaceIndex);
float nextSpaceWidth = GetNextSpaceWidth(lines[i] + c, &nextSpaceIndex);

if ((textOffsetX + nextSpaceWidth) > textBounds.width)
{
Expand Down

0 comments on commit 1af7a87

Please sign in to comment.