Skip to content


Extends: Tool < Object


The tool used to edit the texts.

Accessed by Global.Editor.Tools["TextTool"].


int Mode
float FontSize
Color FontColor
bool SharpenFonts
bool TextBox
int BoxShape
float BorderWidth
Color BoxBackgroundColor
Color BoxBorderColor
OptionButton FontOptions
Text focus
bool isDragging
bool HasFocused


void SetFocus ( Text text )
void OnModeChanged ( int mode )
void SetFont ( int index )
void ChangeFontSize ( float value )
void ChangeColor ( Color color, String name )
void SetSharpenFonts ( bool value )
void SetVisible ( bool value )
void SetTextBox ( bool value )
void SetBoxShape ( int shape )
void OnBorderWidthChanged ( float value )
void UpdateText ( Text text )
void Delete ( )

Property Descriptions

  • int Mode:
    0 = Edit, 1 = Move. Call OnModeChange() to set.

  • float FontSize:
    Changes the font size. UI state. Call ChangeFontSize() instead.

  • Color FontColor:
    Changes the font color. UI state. Call ChangeColor() instead.

  • bool SharpenFonts:
    Sharpens the font when zoomed in. UI state. Call SetSharpenFonts() instead.

  • bool TextBox:
    Puts a box around the text labels. UI state. Call SetTextBox() instead.

  • int BoxShape:
    Changes the shape of the box when enabled. Calls SetBoxShape() internally.

  • float BorderWidth:
    Changes the width of a box. UI state. Call OnBorderWidthChanged() instead.

  • Color BoxBackgroundColor:
    Changes the background color of a box. Set before calling SetTextBox().

  • Color BoxBorderColor:
    Changes the border color of a box. Set before calling SetTextBox().

  • OptionButton FontOptions:
    Reference to the OptionButton representing the font selection. Do not modify the reference, only change the OptionButton itself.

  • Text focus:
    Reference to the Text in focus.

  • bool isDragging:
    Is the user actively dragging a text.

  • bool HasFocused:
    Is there a text in focus. Read only.

Method Descriptions

  • void SetFont ( int index ):
    Changes the font. The index is the value of the font in the dropdown order.

  • void ChangeColor ( Color color, String name ):
    Changes the font colors. Valid entries for names are: "FontColor", "BoxBackgroundColor", and "BoxBorderColor".

  • void SetTextBox ( bool value ):
    Toggles visibility of the box behind a text.

  • void SetBoxShape ( int shape ):
    Changes the shape of the text box. 0 = None, 1 = Square, 2 = Rounded.

  • void UpdateText ( Text text ):
    Updates the Text in focus to settings set in the UI controls and thus the properties.