PowerQuest 0.19.2
Loading...
Searching...
No Matches
IButton Interface Reference

Detailed Description

Gui Button

    Button.KeypadEnter.Clickable = false;
    Button.AnimHover = "FlashRed";
    Button.ColorPress = Color.yellow;
    Button.Text = "Lets do it";
    Button.Description = "This button wins the game";

Inherits IGuiControl.

Properties

new string Description [get, set]
 
new string Cursor [get, set]
 
new string Text [get, set]
 
new string Anim [get, set]
 
string AnimHover [get, set]
 
string AnimClick [get, set]
 
string AnimOff [get, set]
 
new Color Color [get, set]
 
Color ColorHover [get, set]
 
Color ColorClick [get, set]
 
Color ColorOff [get, set]
 
bool Clickable [get, set]
 
bool Animating [get]
 
float Alpha [get, set]
 Gets/Sets the transparency of the sprite.
 
- Properties inherited from IGuiControl
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)
 

Public Member Functions

void PauseAnimation ()
 
void ResumeAnimation ()
 
void StopAnimation ()
 
Coroutine PlayAnimation (string animName)
 
void PlayAnimationBG (string animName)
 
void AddAnimationTrigger (string triggerName, bool removeAfterTriggering, System.Action action)
 
void RemoveAnimationTrigger (string triggerName)
 
Coroutine WaitForAnimTrigger (string triggerName)
 
Coroutine Fade (float start, float end, float duration, eEaseCurve curve=eEaseCurve.Smooth)
 Fade the sprite's alpha.
 
void FadeBG (float start, float end, float duration, eEaseCurve curve=eEaseCurve.InOutSmooth)
 Fade the sprite's alpha (non-blocking)
 
- Public Member Functions inherited from IGuiControl
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)
 

Property Documentation

◆ Description

new string Description
getset

Implements IGuiControl.

◆ Cursor

new string Cursor
getset

Implements IGuiControl.

◆ Text

new string Text
getset

Implements IGuiControl.

◆ Anim

new string Anim
getset

Implements IGuiControl.

◆ Color

new Color Color
getset

Implements IGuiControl.

◆ Alpha

float Alpha
getset

Gets/Sets the transparency of the sprite.

Member Function Documentation

◆ Fade()

Coroutine Fade ( float start,
float end,
float duration,
eEaseCurve curve = eEaseCurve.Smooth )

Fade the sprite's alpha.

◆ FadeBG()

void FadeBG ( float start,
float end,
float duration,
eEaseCurve curve = eEaseCurve.InOutSmooth )

Fade the sprite's alpha (non-blocking)