‪TechbloxModdingAPI  ‪v2.2.0
‪The unofficial Techblox modding API
TechbloxModdingAPI.Interface.IMGUI.Text Class Reference

‪A text input field. This wraps Unity's IMGUI TextField and TextArea. More...

Inheritance diagram for TechbloxModdingAPI.Interface.IMGUI.Text:
TechbloxModdingAPI.Interface.IMGUI.UIElement

Public Member Functions

 Text (Rect box, string initialText=null, string name=null, bool multiline=false)
 ‪Initialize the text input field. More...
 
 Text (string initialText=null, string name=null, bool multiline=false)
 ‪Initialize the text input field with automatic layout. More...
 
override void OnGUI ()
 ‪GUI operations to perform in the OnGUI scope. This is basically equivalent to a MonoBehaviour's OnGUI method. More...
 

Properties

Rect Box = Rect.zero [get, set]
 ‪The rectangular area that the text field can use. More...
 
bool Enabled = true [get, set]
 ‪Whether to display the UI element or not. More...
 
bool Multiline [get, set]
 ‪Whether the text input field is multiline (true -> TextArea) or not (false -> TextField). More...
 
string Name [get]
 ‪The element's name. This should be unique for every instance of the class. More...
 

Events

EventHandler< string > OnEdit
 ‪An event that fires whenever the text input is edited. More...
 

Detailed Description

A text input field. This wraps Unity's IMGUI TextField and TextArea.

Constructor & Destructor Documentation

◆ Text() [1/2]

TechbloxModdingAPI.Interface.IMGUI.Text.Text ( string  initialText = null,
string  name = null,
bool  multiline = false 
)
inline

‪Initialize the text input field with automatic layout.

Parameters
initialText‪Initial text in the input field.
name‪The text field's name.
multiline‪Allow multiple lines?

◆ Text() [2/2]

TechbloxModdingAPI.Interface.IMGUI.Text.Text ( Rect  box,
string  initialText = null,
string  name = null,
bool  multiline = false 
)
inline

‪Initialize the text input field.

Parameters
box‪Rectangular area for the text field.
initialText‪Initial text in the input field.
name‪The text field's name.
multiline‪Allow multiple lines?

Member Function Documentation

◆ OnGUI()

override void TechbloxModdingAPI.Interface.IMGUI.Text.OnGUI ( )
inlinevirtual

‪GUI operations to perform in the OnGUI scope. This is basically equivalent to a MonoBehaviour's OnGUI method.

Implements TechbloxModdingAPI.Interface.IMGUI.UIElement.

Property Documentation

◆ Box

Rect TechbloxModdingAPI.Interface.IMGUI.Text.Box = Rect.zero
getset

‪The rectangular area that the text field can use.

◆ Enabled

bool TechbloxModdingAPI.Interface.IMGUI.UIElement.Enabled = true
getsetinherited

‪Whether to display the UI element or not.

◆ Multiline

bool TechbloxModdingAPI.Interface.IMGUI.Text.Multiline
getset

‪Whether the text input field is multiline (true -> TextArea) or not (false -> TextField).

◆ Name

string TechbloxModdingAPI.Interface.IMGUI.UIElement.Name
getinherited

‪The element's name. This should be unique for every instance of the class.

Event Documentation

◆ OnEdit

EventHandler< string> TechbloxModdingAPI.Interface.IMGUI.Text.OnEdit

‪An event that fires whenever the text input is edited.


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