‪GamecraftModdingAPI  ‪v1.8.0
‪The unofficial Gamecraft modding API
GamecraftModdingAPI.Interface.IMGUI.Text Class Reference

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

Inheritance diagram for GamecraftModdingAPI.Interface.IMGUI.Text:
GamecraftModdingAPI.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...
 
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 text field. More...
 
bool Multiline [get, set]
 ‪Whether the text input field is multiline (true -> TextArea) or not (false -> TextField). More...
 
string Name [get]
 ‪The text field's unique name. 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]

GamecraftModdingAPI.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]

GamecraftModdingAPI.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()

void GamecraftModdingAPI.Interface.IMGUI.Text.OnGUI ( )
inline

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

Implements GamecraftModdingAPI.Interface.IMGUI.UIElement.

Property Documentation

◆ Box

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

‪The rectangular area that the text field can use.

◆ Enabled

bool GamecraftModdingAPI.Interface.IMGUI.Text.Enabled = true
getset

‪Whether to display the text field.

◆ Multiline

bool GamecraftModdingAPI.Interface.IMGUI.Text.Multiline
getset

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

◆ Name

string GamecraftModdingAPI.Interface.IMGUI.Text.Name
get

‪The text field's unique name.

Event Documentation

◆ OnEdit

EventHandler< string> GamecraftModdingAPI.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: