R-Type
Distributed multiplayer game engine in C++
Loading...
Searching...
No Matches
UI::RaylibTextInput Class Reference

Raylib implementation of the ITextInput interface. More...

#include <RaylibTextInput.hpp>

Inheritance diagram for UI::RaylibTextInput:
Inheritance graph
Collaboration diagram for UI::RaylibTextInput:
Collaboration graph

Public Member Functions

 RaylibTextInput (Graphics::IGraphics &graphics)
 Construct a new RaylibTextInput.
 
 ~RaylibTextInput () override=default
 Destroy the RaylibTextInput.
 
void Update () override
 Update the text input internal state (focus, cursor, input).
 
void Render () override
 Render the text input box.
 
void SetOnTextChanged (std::function< void(const std::string &)> callback) override
 Set callback invoked when text changes.
 
void SetPosition (float x, float y) override
 Set the top-left position of the text input.
 
void GetPosition (float &x, float &y) const override
 Get the current top-left position of the text input.
 
void SetSize (float width, float height) override
 Set the text input size.
 
void GetSize (float &width, float &height) const override
 Get the current size of the text input.
 
void SetBackgroundColor (unsigned int color) override
 Set the background color of the text input box.
 
void SetBorderColor (unsigned int color) override
 Set the border color when the input is not focused.
 
void SetActiveBorderColor (unsigned int color) override
 Set the border color when the input is focused/active.
 
void SetTextColor (unsigned int color) override
 Set the text color.
 
void SetPlaceholderColor (unsigned int color) override
 Set the placeholder text color (when input is empty).
 
void SetTextSize (int size) override
 Set the text size in pixels.
 
void SetPlaceholder (const std::string &placeholder) override
 Set the placeholder text displayed when the input is empty.
 
void SetMaxLength (size_t maxLength) override
 Set the maximum number of characters allowed.
 
void SetValidationRegex (const std::string &regexPattern) override
 Set a regex pattern to restrict allowed characters.
 
const std::string & GetText () const override
 Get the current text content.
 
void SetText (const std::string &text) override
 Set the text content programmatically.
 
void Clear () override
 Clear the text content.
 
bool IsFocused () const override
 Check if the text input is currently focused/active.
 
void SetFocused (bool focused) override
 Set focus state programmatically.
 
void SetFont (int fontHandle) override
 Set the font handle for rendering text.
 
void SetAlign (Align align) override
 Set alignment mode relative to the window.
 
Align GetAlign () const override
 Get the current alignment mode.
 
void ApplyAlignment () override
 Apply the current alignment mode to the position.
 
void SetEnabled (bool enabled) override
 Enable or disable the text input.
 
bool IsEnabled () const override
 Check if the text input is enabled.
 
void SetPasswordMode (bool passwordMode) override
 Enable or disable password mode (masks characters with asterisks).
 
bool IsPasswordMode () const override
 Check if password mode is enabled.
 
- Public Member Functions inherited from UI::ITextInput
virtual ~ITextInput ()=default
 Virtual destructor.
 

Private Member Functions

bool IsMouseOver () const
 Check whether the mouse cursor is currently over the input rectangle.
 
bool IsCharValid (char c) const
 Validate a character against the current regex pattern.
 
void HandleFocusClick ()
 Handle mouse click to set focus state.
 
void UpdateCursorBlink ()
 Update cursor blink animation.
 
void HandlePaste ()
 Handle paste operation (Ctrl+V or Cmd+V).
 
void HandleBackspace ()
 Handle backspace key with repeat support.
 
void HandleCharacterInput ()
 Handle regular character input.
 
bool TryAddCharacter (char c)
 Add a character to the text if valid.
 
void ResetCursor ()
 Show cursor and reset blink timer.
 

Private Attributes

Graphics::IGraphics_graphics
 
std::function< void(const std::string &)> _onTextChanged {}
 
float _x {0.0F}
 
float _y {0.0F}
 
float _width {200.0F}
 
float _height {40.0F}
 
unsigned int _backgroundColor {0xFF2A2A2A}
 
unsigned int _borderColor {0xFF505050}
 
unsigned int _activeBorderColor {0xFF4CAF50}
 
unsigned int _textColor {0xFFFFFFFF}
 
unsigned int _placeholderColor {0xFF808080}
 
std::string _text
 
std::string _placeholder
 
int _textSize {20}
 
int _fontHandle {-1}
 
size_t _maxLength {0}
 
std::string _regexPattern
 
std::unique_ptr< std::regex > _validationRegex {}
 
bool _focused {false}
 
bool _enabled {true}
 
bool _passwordMode {false}
 
float _cursorBlinkTimer {0.0F}
 
bool _cursorVisible {true}
 
float _backspaceTimer {0.0F}
 
int _lastBackspaceRepeat {0}
 
Align _align {Align::NONE}
 

Static Private Attributes

static constexpr float CURSOR_BLINK_RATE = 0.5F
 
static constexpr float BORDER_THICKNESS = 2.0F
 
static constexpr float TEXT_PADDING = 8.0F
 
static constexpr float BACKSPACE_REPEAT_DELAY = 0.5F
 
static constexpr float BACKSPACE_REPEAT_RATE = 0.05F
 

Detailed Description

Raylib implementation of the ITextInput interface.

Features:

  • Real-time keyboard input
  • Blinking cursor when focused
  • Max character limit
  • Regex validation (prevents invalid characters)
  • Click to focus/unfocus
  • Visual feedback (border colors)
  • Placeholder text

Definition at line 31 of file RaylibTextInput.hpp.

Constructor & Destructor Documentation

◆ RaylibTextInput()

UI::RaylibTextInput::RaylibTextInput ( Graphics::IGraphics graphics)
explicit

Construct a new RaylibTextInput.

Parameters
graphicsGraphics wrapper used for input and drawing.

Definition at line 14 of file RaylibTextInput.cpp.

◆ ~RaylibTextInput()

UI::RaylibTextInput::~RaylibTextInput ( )
overridedefault

Destroy the RaylibTextInput.

Member Function Documentation

◆ ApplyAlignment()

void UI::RaylibTextInput::ApplyAlignment ( )
overridevirtual

Apply the current alignment mode to the position.

Note
This modifies the position based on the align setting.

Implements UI::ITextInput.

Definition at line 337 of file RaylibTextInput.cpp.

References _align, _graphics, _height, _width, _x, _y, UI::CENTER_BOTH, UI::CENTER_HORIZONTAL, UI::CENTER_VERTICAL, Graphics::IGraphics::GetScreenHeight(), Graphics::IGraphics::GetScreenWidth(), and UI::NONE.

Here is the call graph for this function:

◆ Clear()

void UI::RaylibTextInput::Clear ( )
overridevirtual

Clear the text content.

Implements UI::ITextInput.

Definition at line 309 of file RaylibTextInput.cpp.

References _text.

◆ GetAlign()

Align UI::RaylibTextInput::GetAlign ( ) const
overridevirtual

Get the current alignment mode.

Returns
Alignment mode.

Implements UI::ITextInput.

Definition at line 333 of file RaylibTextInput.cpp.

References _align.

◆ GetPosition()

void UI::RaylibTextInput::GetPosition ( float &  x,
float &  y 
) const
overridevirtual

Get the current top-left position of the text input.

Parameters
xOutput X position in pixels.
yOutput Y position in pixels.

Implements UI::ITextInput.

Definition at line 233 of file RaylibTextInput.cpp.

References _x, and _y.

◆ GetSize()

void UI::RaylibTextInput::GetSize ( float &  width,
float &  height 
) const
overridevirtual

Get the current size of the text input.

Parameters
widthOutput width in pixels.
heightOutput height in pixels.

Implements UI::ITextInput.

Definition at line 243 of file RaylibTextInput.cpp.

References _height, and _width.

◆ GetText()

const std::string & UI::RaylibTextInput::GetText ( ) const
overridevirtual

Get the current text content.

Returns
Current text string.

Implements UI::ITextInput.

Definition at line 297 of file RaylibTextInput.cpp.

References _text.

◆ HandleBackspace()

void UI::RaylibTextInput::HandleBackspace ( )
private

Handle backspace key with repeat support.

Definition at line 86 of file RaylibTextInput.cpp.

References _backspaceTimer, _graphics, _lastBackspaceRepeat, _onTextChanged, _text, BACKSPACE_REPEAT_DELAY, BACKSPACE_REPEAT_RATE, Graphics::IGraphics::GetDeltaTime(), Graphics::IGraphics::IsKeyDown(), Graphics::IGraphics::IsKeyPressed(), and ResetCursor().

Referenced by Update().

Here is the call graph for this function:

◆ HandleCharacterInput()

void UI::RaylibTextInput::HandleCharacterInput ( )
private

Handle regular character input.

Definition at line 126 of file RaylibTextInput.cpp.

References _graphics, _onTextChanged, _text, Graphics::IGraphics::GetCharPressed(), ResetCursor(), and TryAddCharacter().

Referenced by Update().

Here is the call graph for this function:

◆ HandleFocusClick()

void UI::RaylibTextInput::HandleFocusClick ( )
private

Handle mouse click to set focus state.

Definition at line 31 of file RaylibTextInput.cpp.

References _graphics, Graphics::IGraphics::IsMouseButtonPressed(), IsMouseOver(), and SetFocused().

Referenced by Update().

Here is the call graph for this function:

◆ HandlePaste()

void UI::RaylibTextInput::HandlePaste ( )
private

Handle paste operation (Ctrl+V or Cmd+V).

Definition at line 47 of file RaylibTextInput.cpp.

References _graphics, _onTextChanged, _text, Graphics::IGraphics::IsKeyDown(), Graphics::IGraphics::IsKeyPressed(), ResetCursor(), and TryAddCharacter().

Referenced by Update().

Here is the call graph for this function:

◆ IsCharValid()

bool UI::RaylibTextInput::IsCharValid ( char  c) const
private

Validate a character against the current regex pattern.

Parameters
cCharacter to validate.
Returns
true if valid or no regex is set.

Definition at line 385 of file RaylibTextInput.cpp.

References _validationRegex.

Referenced by TryAddCharacter().

◆ IsEnabled()

bool UI::RaylibTextInput::IsEnabled ( ) const
overridevirtual

Check if the text input is enabled.

Returns
true if enabled.

Implements UI::ITextInput.

Definition at line 365 of file RaylibTextInput.cpp.

References _enabled.

◆ IsFocused()

bool UI::RaylibTextInput::IsFocused ( ) const
overridevirtual

Check if the text input is currently focused/active.

Returns
true if focused.

Implements UI::ITextInput.

Definition at line 313 of file RaylibTextInput.cpp.

References _focused.

◆ IsMouseOver()

bool UI::RaylibTextInput::IsMouseOver ( ) const
private

Check whether the mouse cursor is currently over the input rectangle.

Definition at line 377 of file RaylibTextInput.cpp.

References _graphics, _height, _width, _x, _y, Graphics::IGraphics::GetMouseX(), and Graphics::IGraphics::GetMouseY().

Referenced by HandleFocusClick().

Here is the call graph for this function:

◆ IsPasswordMode()

bool UI::RaylibTextInput::IsPasswordMode ( ) const
overridevirtual

Check if password mode is enabled.

Returns
true if password mode is enabled.

Implements UI::ITextInput.

Definition at line 373 of file RaylibTextInput.cpp.

References _passwordMode.

◆ Render()

void UI::RaylibTextInput::Render ( )
overridevirtual

Render the text input box.

Note
Must be called between the backend BeginDrawing/EndDrawing calls.

Implements UI::ITextInput.

Definition at line 163 of file RaylibTextInput.cpp.

References _activeBorderColor, _backgroundColor, _borderColor, _cursorVisible, _enabled, _focused, _graphics, _height, _passwordMode, _placeholder, _placeholderColor, _text, _textColor, _textSize, _width, _x, _y, Graphics::IGraphics::DrawRectangle(), Graphics::IGraphics::DrawRectangleLines(), Graphics::IGraphics::DrawText(), and TEXT_PADDING.

Here is the call graph for this function:

◆ ResetCursor()

void UI::RaylibTextInput::ResetCursor ( )
private

Show cursor and reset blink timer.

Definition at line 158 of file RaylibTextInput.cpp.

References _cursorBlinkTimer, and _cursorVisible.

Referenced by HandleBackspace(), HandleCharacterInput(), and HandlePaste().

◆ SetActiveBorderColor()

void UI::RaylibTextInput::SetActiveBorderColor ( unsigned int  color)
overridevirtual

Set the border color when the input is focused/active.

Parameters
colorColor in ARGB format (0xAARRGGBB).

Implements UI::ITextInput.

Definition at line 256 of file RaylibTextInput.cpp.

References _activeBorderColor.

◆ SetAlign()

void UI::RaylibTextInput::SetAlign ( Align  align)
overridevirtual

Set alignment mode relative to the window.

Parameters
alignAlignment mode.

Implements UI::ITextInput.

Definition at line 329 of file RaylibTextInput.cpp.

References _align.

◆ SetBackgroundColor()

void UI::RaylibTextInput::SetBackgroundColor ( unsigned int  color)
overridevirtual

Set the background color of the text input box.

Parameters
colorColor in ARGB format (0xAARRGGBB).

Implements UI::ITextInput.

Definition at line 248 of file RaylibTextInput.cpp.

References _backgroundColor.

◆ SetBorderColor()

void UI::RaylibTextInput::SetBorderColor ( unsigned int  color)
overridevirtual

Set the border color when the input is not focused.

Parameters
colorColor in ARGB format (0xAARRGGBB).

Implements UI::ITextInput.

Definition at line 252 of file RaylibTextInput.cpp.

References _borderColor.

◆ SetEnabled()

void UI::RaylibTextInput::SetEnabled ( bool  enabled)
overridevirtual

Enable or disable the text input.

Parameters
enabledtrue to enable, false to disable.

Implements UI::ITextInput.

Definition at line 358 of file RaylibTextInput.cpp.

References _enabled, and _focused.

◆ SetFocused()

void UI::RaylibTextInput::SetFocused ( bool  focused)
overridevirtual

Set focus state programmatically.

Parameters
focusedtrue to focus, false to blur.

Implements UI::ITextInput.

Definition at line 317 of file RaylibTextInput.cpp.

References _cursorBlinkTimer, _cursorVisible, and _focused.

Referenced by HandleFocusClick().

◆ SetFont()

void UI::RaylibTextInput::SetFont ( int  fontHandle)
overridevirtual

Set the font handle for rendering text.

Parameters
fontHandleFont handle (-1 for default font).

Implements UI::ITextInput.

Definition at line 325 of file RaylibTextInput.cpp.

References _fontHandle.

◆ SetMaxLength()

void UI::RaylibTextInput::SetMaxLength ( size_t  maxLength)
overridevirtual

Set the maximum number of characters allowed.

Parameters
maxLengthMaximum character count (0 = unlimited).

Implements UI::ITextInput.

Definition at line 276 of file RaylibTextInput.cpp.

References _maxLength, and _text.

◆ SetOnTextChanged()

void UI::RaylibTextInput::SetOnTextChanged ( std::function< void(const std::string &)>  callback)
overridevirtual

Set callback invoked when text changes.

Parameters
callbackFunction called when the text content changes.

Implements UI::ITextInput.

Definition at line 224 of file RaylibTextInput.cpp.

References _onTextChanged.

◆ SetPasswordMode()

void UI::RaylibTextInput::SetPasswordMode ( bool  passwordMode)
overridevirtual

Enable or disable password mode (masks characters with asterisks).

Parameters
passwordModetrue to mask characters, false to show them normally.

Implements UI::ITextInput.

Definition at line 369 of file RaylibTextInput.cpp.

References _passwordMode.

◆ SetPlaceholder()

void UI::RaylibTextInput::SetPlaceholder ( const std::string &  placeholder)
overridevirtual

Set the placeholder text displayed when the input is empty.

Parameters
placeholderPlaceholder string.

Implements UI::ITextInput.

Definition at line 272 of file RaylibTextInput.cpp.

References _placeholder.

◆ SetPlaceholderColor()

void UI::RaylibTextInput::SetPlaceholderColor ( unsigned int  color)
overridevirtual

Set the placeholder text color (when input is empty).

Parameters
colorColor in ARGB format (0xAARRGGBB).

Implements UI::ITextInput.

Definition at line 264 of file RaylibTextInput.cpp.

References _placeholderColor.

◆ SetPosition()

void UI::RaylibTextInput::SetPosition ( float  x,
float  y 
)
overridevirtual

Set the top-left position of the text input.

Parameters
xX position in pixels.
yY position in pixels.

Implements UI::ITextInput.

Definition at line 228 of file RaylibTextInput.cpp.

References _x, and _y.

◆ SetSize()

void UI::RaylibTextInput::SetSize ( float  width,
float  height 
)
overridevirtual

Set the text input size.

Parameters
widthWidth in pixels.
heightHeight in pixels.

Implements UI::ITextInput.

Definition at line 238 of file RaylibTextInput.cpp.

References _height, and _width.

◆ SetText()

void UI::RaylibTextInput::SetText ( const std::string &  text)
overridevirtual

Set the text content programmatically.

Parameters
textNew text content.

Implements UI::ITextInput.

Definition at line 301 of file RaylibTextInput.cpp.

References _maxLength, and _text.

◆ SetTextColor()

void UI::RaylibTextInput::SetTextColor ( unsigned int  color)
overridevirtual

Set the text color.

Parameters
colorColor in ARGB format (0xAARRGGBB).

Implements UI::ITextInput.

Definition at line 260 of file RaylibTextInput.cpp.

References _textColor.

◆ SetTextSize()

void UI::RaylibTextInput::SetTextSize ( int  size)
overridevirtual

Set the text size in pixels.

Parameters
sizeFont size.

Implements UI::ITextInput.

Definition at line 268 of file RaylibTextInput.cpp.

References _textSize.

◆ SetValidationRegex()

void UI::RaylibTextInput::SetValidationRegex ( const std::string &  regexPattern)
overridevirtual

Set a regex pattern to restrict allowed characters.

Parameters
regexPatternRegex pattern string (e.g., "[a-zA-Z0-9]+" for alphanumeric only). Empty string = no restriction.
Note
Validation is applied in real-time: invalid characters are rejected on input.

Implements UI::ITextInput.

Definition at line 284 of file RaylibTextInput.cpp.

References _regexPattern, and _validationRegex.

◆ TryAddCharacter()

bool UI::RaylibTextInput::TryAddCharacter ( char  c)
private

Add a character to the text if valid.

Parameters
cCharacter to add.
Returns
true if character was added.

Definition at line 143 of file RaylibTextInput.cpp.

References _maxLength, _text, and IsCharValid().

Referenced by HandleCharacterInput(), and HandlePaste().

Here is the call graph for this function:

◆ Update()

void UI::RaylibTextInput::Update ( )
overridevirtual

Update the text input internal state (focus, cursor, input).

Note
Should be called once per frame.

Implements UI::ITextInput.

Definition at line 16 of file RaylibTextInput.cpp.

References _enabled, _focused, HandleBackspace(), HandleCharacterInput(), HandleFocusClick(), HandlePaste(), and UpdateCursorBlink().

Here is the call graph for this function:

◆ UpdateCursorBlink()

void UI::RaylibTextInput::UpdateCursorBlink ( )
private

Update cursor blink animation.

Definition at line 39 of file RaylibTextInput.cpp.

References _cursorBlinkTimer, _cursorVisible, _graphics, CURSOR_BLINK_RATE, and Graphics::IGraphics::GetDeltaTime().

Referenced by Update().

Here is the call graph for this function:

Member Data Documentation

◆ _activeBorderColor

unsigned int UI::RaylibTextInput::_activeBorderColor {0xFF4CAF50}
private

Definition at line 193 of file RaylibTextInput.hpp.

Referenced by Render(), and SetActiveBorderColor().

◆ _align

Align UI::RaylibTextInput::_align {Align::NONE}
private

Definition at line 216 of file RaylibTextInput.hpp.

Referenced by ApplyAlignment(), GetAlign(), and SetAlign().

◆ _backgroundColor

unsigned int UI::RaylibTextInput::_backgroundColor {0xFF2A2A2A}
private

Definition at line 191 of file RaylibTextInput.hpp.

Referenced by Render(), and SetBackgroundColor().

◆ _backspaceTimer

float UI::RaylibTextInput::_backspaceTimer {0.0F}
private

Definition at line 213 of file RaylibTextInput.hpp.

Referenced by HandleBackspace().

◆ _borderColor

unsigned int UI::RaylibTextInput::_borderColor {0xFF505050}
private

Definition at line 192 of file RaylibTextInput.hpp.

Referenced by Render(), and SetBorderColor().

◆ _cursorBlinkTimer

float UI::RaylibTextInput::_cursorBlinkTimer {0.0F}
private

Definition at line 209 of file RaylibTextInput.hpp.

Referenced by ResetCursor(), SetFocused(), and UpdateCursorBlink().

◆ _cursorVisible

bool UI::RaylibTextInput::_cursorVisible {true}
private

Definition at line 210 of file RaylibTextInput.hpp.

Referenced by Render(), ResetCursor(), SetFocused(), and UpdateCursorBlink().

◆ _enabled

bool UI::RaylibTextInput::_enabled {true}
private

Definition at line 207 of file RaylibTextInput.hpp.

Referenced by IsEnabled(), Render(), SetEnabled(), and Update().

◆ _focused

bool UI::RaylibTextInput::_focused {false}
private

Definition at line 206 of file RaylibTextInput.hpp.

Referenced by IsFocused(), Render(), SetEnabled(), SetFocused(), and Update().

◆ _fontHandle

int UI::RaylibTextInput::_fontHandle {-1}
private

Definition at line 200 of file RaylibTextInput.hpp.

Referenced by SetFont().

◆ _graphics

◆ _height

float UI::RaylibTextInput::_height {40.0F}
private

Definition at line 189 of file RaylibTextInput.hpp.

Referenced by ApplyAlignment(), GetSize(), IsMouseOver(), Render(), and SetSize().

◆ _lastBackspaceRepeat

int UI::RaylibTextInput::_lastBackspaceRepeat {0}
private

Definition at line 214 of file RaylibTextInput.hpp.

Referenced by HandleBackspace().

◆ _maxLength

size_t UI::RaylibTextInput::_maxLength {0}
private

Definition at line 202 of file RaylibTextInput.hpp.

Referenced by SetMaxLength(), SetText(), and TryAddCharacter().

◆ _onTextChanged

std::function<void(const std::string &)> UI::RaylibTextInput::_onTextChanged {}
private

◆ _passwordMode

bool UI::RaylibTextInput::_passwordMode {false}
private

Definition at line 208 of file RaylibTextInput.hpp.

Referenced by IsPasswordMode(), Render(), and SetPasswordMode().

◆ _placeholder

std::string UI::RaylibTextInput::_placeholder
private

Definition at line 198 of file RaylibTextInput.hpp.

Referenced by Render(), and SetPlaceholder().

◆ _placeholderColor

unsigned int UI::RaylibTextInput::_placeholderColor {0xFF808080}
private

Definition at line 195 of file RaylibTextInput.hpp.

Referenced by Render(), and SetPlaceholderColor().

◆ _regexPattern

std::string UI::RaylibTextInput::_regexPattern
private

Definition at line 203 of file RaylibTextInput.hpp.

Referenced by SetValidationRegex().

◆ _text

std::string UI::RaylibTextInput::_text
private

◆ _textColor

unsigned int UI::RaylibTextInput::_textColor {0xFFFFFFFF}
private

Definition at line 194 of file RaylibTextInput.hpp.

Referenced by Render(), and SetTextColor().

◆ _textSize

int UI::RaylibTextInput::_textSize {20}
private

Definition at line 199 of file RaylibTextInput.hpp.

Referenced by Render(), and SetTextSize().

◆ _validationRegex

std::unique_ptr<std::regex> UI::RaylibTextInput::_validationRegex {}
private

Definition at line 204 of file RaylibTextInput.hpp.

Referenced by IsCharValid(), and SetValidationRegex().

◆ _width

float UI::RaylibTextInput::_width {200.0F}
private

Definition at line 188 of file RaylibTextInput.hpp.

Referenced by ApplyAlignment(), GetSize(), IsMouseOver(), Render(), and SetSize().

◆ _x

float UI::RaylibTextInput::_x {0.0F}
private

Definition at line 186 of file RaylibTextInput.hpp.

Referenced by ApplyAlignment(), GetPosition(), IsMouseOver(), Render(), and SetPosition().

◆ _y

float UI::RaylibTextInput::_y {0.0F}
private

Definition at line 187 of file RaylibTextInput.hpp.

Referenced by ApplyAlignment(), GetPosition(), IsMouseOver(), Render(), and SetPosition().

◆ BACKSPACE_REPEAT_DELAY

constexpr float UI::RaylibTextInput::BACKSPACE_REPEAT_DELAY = 0.5F
staticconstexprprivate

Definition at line 221 of file RaylibTextInput.hpp.

Referenced by HandleBackspace().

◆ BACKSPACE_REPEAT_RATE

constexpr float UI::RaylibTextInput::BACKSPACE_REPEAT_RATE = 0.05F
staticconstexprprivate

Definition at line 222 of file RaylibTextInput.hpp.

Referenced by HandleBackspace().

◆ BORDER_THICKNESS

constexpr float UI::RaylibTextInput::BORDER_THICKNESS = 2.0F
staticconstexprprivate

Definition at line 219 of file RaylibTextInput.hpp.

◆ CURSOR_BLINK_RATE

constexpr float UI::RaylibTextInput::CURSOR_BLINK_RATE = 0.5F
staticconstexprprivate

Definition at line 218 of file RaylibTextInput.hpp.

Referenced by UpdateCursorBlink().

◆ TEXT_PADDING

constexpr float UI::RaylibTextInput::TEXT_PADDING = 8.0F
staticconstexprprivate

Definition at line 220 of file RaylibTextInput.hpp.

Referenced by Render().


The documentation for this class was generated from the following files: