class
GUIInputCaret
Helper class for dealing with caret for text input boxes and similar controls.
Public
Constructors
GUIInputCaret
Methods
~GUIInputCaret
GetBounds
Returns the bounds of the caret, relative to the current parent GUI element.
UpdateSprite
Rebuilts internal caret sprite using current properties.
MoveCaretToStart
Moves caret to the start of text.
MoveCaretToEnd
Moves caret to the end of text.
MoveCaretLeft
Moves caret one character to the left, if not at start already.
MoveCaretRight
Moves caret one character to the right, if not at end already.
MoveCaretUp
Moves caret one line up if possible.
MoveCaretDown
Moves caret one line down if possible.
MoveCaretToPos
Moves caret to the character nearest to the specified position.
Position is relative to parent GUI element.
MoveCaretToChar
Moves the caret to a specific character index.
- characterIndex
- Index of the character to move the caret to.
- caretPos
- Whether to place the caret before or after the character.
GetCharIdxAtCaretPos
Returns character index after the current caret position.
GetCaretPosition
Returns current caret position, relative to parent GUI element.
GetCaretHeight
Returns height of the caret, in pixels.
IsCaretAtNewline
Returns true if the character after the caret is newline.
GetMaxCaretPos
Returns maximum valid caret index.
GetCaretPos
Returns current caret index (not equal to character index).