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

‪A clickable button. This wraps Unity's IMGUI Button. More...

Inheritance diagram for GamecraftModdingAPI.Interface.IMGUI.Button:
GamecraftModdingAPI.Interface.IMGUI.UIElement

Public Member Functions

 Button (string text, Rect box, string name=null)
 ‪Initialize a new button. More...
 
 Button (string text, string name=null)
 ‪Initialize a new button 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 button can use. More...
 
bool Enabled = true [get, set]
 ‪Whether to display the button. More...
 
string Name [get]
 ‪The button's unique name. More...
 

Events

EventHandler< bool > OnClick
 ‪An event that fires when the button is clicked. More...
 

Detailed Description

A clickable button. This wraps Unity's IMGUI Button.

Constructor & Destructor Documentation

◆ Button() [1/2]

GamecraftModdingAPI.Interface.IMGUI.Button.Button ( string  text,
string  name = null 
)
inline

‪Initialize a new button with automatic layout.

Parameters
text‪The text to display on the button.
name‪The button's name.

◆ Button() [2/2]

GamecraftModdingAPI.Interface.IMGUI.Button.Button ( string  text,
Rect  box,
string  name = null 
)
inline

‪Initialize a new button.

Parameters
text‪The text to display on the button.
box‪Rectangular area for the button to use.
name‪The button's name.

Member Function Documentation

◆ OnGUI()

void GamecraftModdingAPI.Interface.IMGUI.Button.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.Button.Box = Rect.zero
getset

‪The rectangular area that the button can use.

◆ Enabled

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

‪Whether to display the button.

◆ Name

string GamecraftModdingAPI.Interface.IMGUI.Button.Name
get

‪The button's unique name.

Event Documentation

◆ OnClick

EventHandler< bool> GamecraftModdingAPI.Interface.IMGUI.Button.OnClick

‪An event that fires when the button is clicked.


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