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

‪A group of elements. This wraps Unity's GUILayout Area and GUI Group system. More...

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

Public Member Functions

 Group (Rect box, string name=null, bool automaticLayout=false)
 ‪Initializes a new instance of the T:GamecraftModdingAPI.Interface.IMGUI.Group class. More...
 
int AddElement (UIElement element)
 ‪Add an element to the group. More...
 
int IndexOf (UIElement element)
 ‪Get the index of an element. More...
 
void OnGUI ()
 ‪GUI operations to perform in the OnGUI scope. This is basically equivalent to a MonoBehaviour's OnGUI method. More...
 
bool RemoveAt (int index)
 ‪Remove the element in a specific location. More...
 
bool RemoveElement (UIElement element)
 ‪Remove an element from the group. More...
 

Properties

Rect Box [get, set]
 ‪The rectangular area in the window that the UI group can use More...
 
bool Enabled = true [get, set]
 ‪Whether to display the group and everything in it. More...
 
int Length [get]
 ‪The amount of elements in the group. More...
 
string Name [get]
 ‪The group's unique name. More...
 

Detailed Description

A group of elements. This wraps Unity's GUILayout Area and GUI Group system.

Constructor & Destructor Documentation

◆ Group()

GamecraftModdingAPI.Interface.IMGUI.Group.Group ( Rect  box,
string  name = null,
bool  automaticLayout = false 
)
inline

‪Initializes a new instance of the T:GamecraftModdingAPI.Interface.IMGUI.Group class.

Parameters
box‪The rectangular area to use in the window.
name‪Name of the group.
automaticLayout‪Whether to use automatic UI layout.

Member Function Documentation

◆ AddElement()

int GamecraftModdingAPI.Interface.IMGUI.Group.AddElement ( UIElement  element)
inline

‪Add an element to the group.

Parameters
element‪The element to add.
Returns
‪Index of the new element.

◆ IndexOf()

int GamecraftModdingAPI.Interface.IMGUI.Group.IndexOf ( UIElement  element)
inline

‪Get the index of an element.

Parameters
element‪The element to search for.
Returns
‪The element's index, or -1 if not found.

◆ OnGUI()

void GamecraftModdingAPI.Interface.IMGUI.Group.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.

◆ RemoveAt()

bool GamecraftModdingAPI.Interface.IMGUI.Group.RemoveAt ( int  index)
inline

‪Remove the element in a specific location.

Parameters
index‪Index of the element.
Returns
‪Whether removal was successful.

◆ RemoveElement()

bool GamecraftModdingAPI.Interface.IMGUI.Group.RemoveElement ( UIElement  element)
inline

‪Remove an element from the group.

Parameters
element‪The element to remove.
Returns
‪Whether removal was successful.

Property Documentation

◆ Box

Rect GamecraftModdingAPI.Interface.IMGUI.Group.Box
getset

‪The rectangular area in the window that the UI group can use

◆ Enabled

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

‪Whether to display the group and everything in it.

◆ Length

int GamecraftModdingAPI.Interface.IMGUI.Group.Length
get

‪The amount of elements in the group.

◆ Name

string GamecraftModdingAPI.Interface.IMGUI.Group.Name
get

‪The group's unique name.


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