IGui: Contains functions for and data manipluating Gui objects.
G.Inventory.Show();
G.HoverText.Hide();
G.Prompt.Script.Show("Are you sure you want to quit?","Yes","No", ()=>Application.Quit());
|
string | ScriptName [get] |
| The name used in scripts.
|
|
MonoBehaviour | Instance [get] |
| Access to the actual game object component in the scene.
|
|
bool | Visible [get, set] |
| Gets or sets whether the object is visible.
|
|
bool | Clickable [get, set] |
| Gets or Sets whether clicking on the object triggers an event. Can be set false to have a gui visible but not clickable.
|
|
bool | HasFocus [get] |
| Returns true if this gui has focus in the game (ie: the current gui the player's looking at/clicking on)
|
|
bool | VisibleInCutscenes [get, set] |
| Gets or Sets whether this gui is visible during blocking sequences.
|
|
bool | Modal [get, set] |
| Gets or Sets whether this gui blocks clicks behind it.
|
|
bool | PauseGame [get, set] |
| Whether gameplay is paused while the gui is visible.
|
|
Vector2 | Position [get, set] |
| The location of the gui. Note that if gui is aligned to screen, changing this won't have an effect.
|
|
float | Baseline [get, set] |
| Gets or sets the baseline used for sorting. Just like with hotspots/charcters, LOWER is in-front (eg: -4 is in-front of 6)
|
|
string | Cursor [get, set] |
| Sets a cursor to show when hovering over the gui's hotspot (or anywhere if its a modal gui). Can be overriden by specific controls.
|
|
Gui | Data [get] |
| PowerQuest internal function: Access to the base class with extra functionality.
|
|
|
void | Show () |
| Sets a gui visible and clickable.
|
|
void | Hide () |
| Sets a gui non-visible, and non-clickable.
|
|
void | ShowAtFront () |
| Shows the gui, in front of all others.
|
|
void | ShowAtBack () |
| Shows the gui, behind all others.
|
|
void | ShowBehind (IGui gui) |
| Shows the gui, behind a specific other gui.
|
|
void | ShowInfront (IGui gui) |
| Shows the gui, in front of a specific other gui.
|
|
bool | GetKeyPressed (eGuiNav key) |
| Returns true if gui navigation key is pressed which hasn't been consumed by a control (consumes this keypress)
|
|
bool | Navigate (eGuiNav button) |
| Tells the gui to handle a keyboard or controller input. eg. Left/Right/Up/Down inputs will navigate between controls, or slide sliders, and 'Ok' will press buttons.
|
|
void | NavigateToControl (IGuiControl control) |
| Call this to specify which control should be navigated to. When using keyboard/controller for menues.
|
|
void | ResetNavigation () |
| Resets any control that's been focused by keyboard navigation.
|
|
GuiControl | GetControl (string name) |
| Retreives a specific IGuiControl from the gui.
|
|
bool | HasControl (string name) |
| Returns true if the control exists.
|
|
T | GetScript< T > () |
| PowerQuest internal function: Access to the specific quest script for the room. Use the specific room script as the templated parameter so you can access specific members of the script. Eg: GetScript<GuiPrompt>().Show("Blah");
|
|
GuiControl GetControl |
( |
string | name | ) |
|
Retreives a specific IGuiControl from the gui.
Retreives a specific IGuiControl from the gui.
Controls can be cast to Buttons, Labels, etc. Eg:
IButton button = (IButton)G.Keypad.GetControl("AcceptButton");
button.Color = Color.Red;
NB: The gui must be instantiated for this to work. It might not work in scene loading scripts.