tModLoader v2025.08
A mod to make and play Terraria mods
UITextBox Class Reference

Inherits UITextPanel< string >.

Public Member Functions

 UITextBox (string text, float textScale=1f, bool large=false)
 
void Backspace ()
 
void CursorLeft ()
 
void CursorRight ()
 
override void SetText (string text, float textScale, bool large)
 
void SetTextMaxLength (int maxLength)
 
void Write (string text)
 
- Public Member Functions inherited from UITextPanel< string >
 UITextPanel (T text, float textScale=1f, bool large=false)
 
override void Recalculate ()
 
void SetText (T text)
 
virtual void SetText (T text, float textScale, bool large)
 

Public Attributes

bool HideSelf
 
bool ShowInputTicker = true
 
- Public Attributes inherited from UITextPanel< string >
bool HideContents
 
float TextHAlign
 

Protected Member Functions

override void DrawSelf (SpriteBatch spriteBatch)
 
- Protected Member Functions inherited from UITextPanel< string >
override void DrawSelf (SpriteBatch spriteBatch)
 Used to draw this element (not the children). Use this to give an element custom visuals. Use GetDimensions to determine the area to draw in.
 
void DrawText (SpriteBatch spriteBatch)
 

Additional Inherited Members

- Protected Attributes inherited from UITextPanel< string >
Color _color
 
bool _drawPanel
 
bool _isLarge
 
_text
 
float _textScale
 
Vector2 _textSize
 
- Properties inherited from UITextPanel< string >
bool DrawPanel [get, set]
 
bool IsLarge [get]
 
string Text [get]
 
Color TextColor [get, set]
 
float TextScale [get, set]
 
Vector2 TextSize [get]