PowerQuest 0.15.13
GuiScripts Class Reference

Detailed Description

Each gui you create will have its own GuiScript file These are created automatically with the name appended, eg: GuiKeypad.cs

From Gui scripts you have some helpful properties give access to their own IGui, and Controls. View the full list is here.

Eg:

  • Label.KeypadReadout.Text = "ENTER PASSWORD";
  • Button.KeypadEnter.Color = Color.Red;
  • Data.Hide();

Inherits GuiScript.

Properties

Gui Data [get]
 Get the IGui associated with this script. eg. Data.Hide() More...
 

Public Member Functions

IGui Data ()
 Retrieve the gui for this script. More...
 
void OnShow ()
 Called when the Gui is made visible. More...
 
void Update ()
 Called every frame. Non-blocking functions only. More...
 
IEnumerator OnAnyClick (IGuiControl control)
 Blocking script called when ANY click is made on the gui. More...
 
IEnumerator OnClick (IGuiControl control)
 Blocking script called when a button is clicked. The name is appended to the function, eg: OnClickAcceptButton(...). More...
 
IGuiControl Control (string name)
 Gets an IGuiControl from this script's gui. All gui buttons, image, labels, etc are types of Controls. This function returns their base class. Can be used for your own custom Controls too. eg. Control.MyCustomButton.Hide() eg. Control.MyCustomControl.Instance.GetComponent<CoolCustomControl>().DoSomethingCool(); More...
 
IButton Button (string name)
 Gets an IButton from this script's gui. eg. Button.KeypadEnter.Clickable = false; More...
 
ILabel Label (string name)
 Gets an ILabel from this script's gui. eg. Label.KeypadReadout.Text = "ENTER PASSWORD"; More...
 
IImage Image (string name)
 Gets an IImage from this script's gui. eg. Image.LockedIndicator.Image = "Unlocked"; More...
 
ISlider Slider (string name)
 Gets an ISlider from this script's gui. eg. Sliders.Volume.Ratio = Settings.Volume"; More...
 
IInventoryPanel InventoryPanel (string name)
 Gets an IInventoryPanel from this script's gui. eg. IInventoryPanel.MyInvPanel.ScrollForward(); More...
 
IContainer Container (string name)
 Gets an IContainer from this script's gui. eg. IContainer.MyList.Grid.ScrollForward(); More...
 

Property Documentation

◆ Data

Gui Data
get

Get the IGui associated with this script. eg. Data.Hide()

See also
IGui

Member Function Documentation

◆ Data()

IGui Data ( )

Retrieve the gui for this script.

◆ OnShow()

void OnShow ( )

Called when the Gui is made visible.

◆ Update()

void Update ( )

Called every frame. Non-blocking functions only.

◆ OnAnyClick()

IEnumerator OnAnyClick ( IGuiControl  control)

Blocking script called when ANY click is made on the gui.

◆ OnClick()

IEnumerator OnClick ( IGuiControl  control)

Blocking script called when a button is clicked. The name is appended to the function, eg: OnClickAcceptButton(...).

◆ Control()

IGuiControl Control ( string  name)
inline

Gets an IGuiControl from this script's gui. All gui buttons, image, labels, etc are types of Controls. This function returns their base class. Can be used for your own custom Controls too. eg. Control.MyCustomButton.Hide() eg. Control.MyCustomControl.Instance.GetComponent<CoolCustomControl>().DoSomethingCool();

See also
Button
Label
Image

◆ Button()

IButton Button ( string  name)
inline

Gets an IButton from this script's gui. eg. Button.KeypadEnter.Clickable = false;

See also
Control
Label
Image
Slider
InventoryPanel

◆ Label()

ILabel Label ( string  name)
inline

Gets an ILabel from this script's gui. eg. Label.KeypadReadout.Text = "ENTER PASSWORD";

See also
Control
Button
Image

◆ Image()

IImage Image ( string  name)
inline

Gets an IImage from this script's gui. eg. Image.LockedIndicator.Image = "Unlocked";

See also
Control
Label
Button

◆ Slider()

ISlider Slider ( string  name)
inline

Gets an ISlider from this script's gui. eg. Sliders.Volume.Ratio = Settings.Volume";

See also
Control
Button
Image
Label

◆ InventoryPanel()

IInventoryPanel InventoryPanel ( string  name)
inline

Gets an IInventoryPanel from this script's gui. eg. IInventoryPanel.MyInvPanel.ScrollForward();

See also
Control
Label
Button
Image

◆ Container()

IContainer Container ( string  name)
inline

Gets an IContainer from this script's gui. eg. IContainer.MyList.Grid.ScrollForward();

See also
Control
Label
Button
Image