All gui controls inherit from IGuiControl. (Buttons, Labels, etc)
Label.ErrorMessage.Show();
Image.Crosshair.Position = E.MousePosition();
Button.Accept.Hide();
Also see specific gui controls: IButton, IImage, ILabel, IInventoryPanel, ISlider, ITextField
Inherited by IButton, IContainer, IImage, IInventoryPanel, ILabel, ISlider, and ITextField.
|
MonoBehaviour | Instance [get] |
| Access to the actual game object component in the scene. Note that controls themselves can be cast to their component type if known.
|
|
bool | Visible [get, set] |
| Sets the control visible invisible the control.
|
|
Vector2 | Position [get, set] |
| Gets/Sets the position of the control. Note that this will be overridden if using AlignTo or FitTo component.
|
|
bool | Focused [get] |
| Gets/Sets whether this control is focused (ie: the mouse is hovering over it, or it's selected with keyboard)
|
|
bool | HasKeyboardFocus [get, set] |
| Gets/Sets whether this control has the current keyboard focus (can also be used for specifying which control has 'controller' focus)
|
|
string | Description [get, set] |
|
string | Cursor [get, set] |
|
string | Text [get, set] |
|
string | Anim [get, set] |
|
Color | Color [get, set] |
|
|
void | Show () |
| Shows the control.
|
|
void | Hide () |
| Hides the control.
|
|
void | SetPosition (float x, float y) |
| Sets the position of the control. Note that this will be overridden if using AlignTo or FitTo component.
|
|
GuiControl | DuplicateControl (string name=null, IGuiControl parent=null) |
| Duplicates the control. Useful for adding elements dynamically to a gui. You can optionally specify a new name for the control, and a parent object (such as a grid container)
|
|
◆ Instance
Access to the actual game object component in the scene. Note that controls themselves can be cast to their component type if known.
◆ Visible
Sets the control visible invisible the control.
◆ Position
Gets/Sets the position of the control. Note that this will be overridden if using AlignTo or FitTo component.
◆ Focused
Gets/Sets whether this control is focused (ie: the mouse is hovering over it, or it's selected with keyboard)
◆ HasKeyboardFocus
Gets/Sets whether this control has the current keyboard focus (can also be used for specifying which control has 'controller' focus)
◆ Show()
◆ Hide()
◆ SetPosition()
void SetPosition |
( |
float | x, |
|
|
float | y ) |
Sets the position of the control. Note that this will be overridden if using AlignTo or FitTo component.
◆ DuplicateControl()
GuiControl DuplicateControl |
( |
string | name = null, |
|
|
IGuiControl | parent = null ) |
Duplicates the control. Useful for adding elements dynamically to a gui. You can optionally specify a new name for the control, and a parent object (such as a grid container)