REVIEWED: parameter name

This commit is contained in:
Ray 2024-03-18 19:20:20 +01:00
parent 82ba2b1a78
commit 9060e3bf33

View File

@ -2439,7 +2439,7 @@ int GuiDropdownBox(Rectangle bounds, const char *text, int *active, bool editMod
// Text Box control
// NOTE: Returns true on ENTER pressed (useful for data validation)
int GuiTextBox(Rectangle bounds, char *text, int bufferSize, bool editMode)
int GuiTextBox(Rectangle bounds, char *text, int textSize, bool editMode)
{
#if !defined(RAYGUI_TEXTBOX_AUTO_CURSOR_COOLDOWN)
#define RAYGUI_TEXTBOX_AUTO_CURSOR_COOLDOWN 40 // Frames to wait for autocursor movement
@ -2528,7 +2528,7 @@ int GuiTextBox(Rectangle bounds, char *text, int bufferSize, bool editMode)
// Add codepoint to text, at current cursor position
// NOTE: Make sure we do not overflow buffer size
if (((multiline && (codepoint == (int)'\n')) || (codepoint >= 32)) && ((textLength + codepointSize) < bufferSize))
if (((multiline && (codepoint == (int)'\n')) || (codepoint >= 32)) && ((textLength + codepointSize) < textSize))
{
// Move forward data from cursor position
for (int i = (textLength + codepointSize); i > textBoxCursorIndex; i--) text[i] = text[i - codepointSize];
@ -2726,7 +2726,7 @@ int GuiTextBox(Rectangle bounds, char *text, int bufferSize, bool editMode)
/*
// Text Box control with multiple lines and word-wrap
// NOTE: This text-box is readonly, no editing supported by default
bool GuiTextBoxMulti(Rectangle bounds, char *text, int bufferSize, bool editMode)
bool GuiTextBoxMulti(Rectangle bounds, char *text, int textSize, bool editMode)
{
bool pressed = false;
@ -2735,7 +2735,7 @@ bool GuiTextBoxMulti(Rectangle bounds, char *text, int bufferSize, bool editMode
GuiSetStyle(DEFAULT, TEXT_ALIGNMENT_VERTICAL, TEXT_ALIGN_TOP);
// TODO: Implement methods to calculate cursor position properly
pressed = GuiTextBox(bounds, text, bufferSize, editMode);
pressed = GuiTextBox(bounds, text, textSize, editMode);
GuiSetStyle(DEFAULT, TEXT_ALIGNMENT_VERTICAL, TEXT_ALIGN_MIDDLE);
GuiSetStyle(DEFAULT, TEXT_WRAP_MODE, TEXT_WRAP_NONE);