PowerQuest 0.20.6
Loading...
Searching...
No Matches
ISlider Interface Reference

Detailed Description

Gui Slider - Good for volume controls

    Slider.Volume.Clickable = false;            
    Slider.Volume.Text = "Volume";
    Audio.Volume = Slider.Volume.Ratio;

Inherits IGuiControl.

Properties

new string Description [get, set]
 Gets/Sets the description text shown to players when they hover the mouse over the control.
 
new string Cursor [get, set]
 Gets or sets the cursor to show when hovering over the control (if it's clickable). If empty, default active cursor will be used.
 
new string Text [get, set]
 Gets/Sets the current text in the control.
 
float Ratio [get, set]
 How far along the bar the handle is. From 0 to 1.
 
string AnimBar [get, set]
 Gets/Sets the Sprite (or animation) for the slider's background. Note, that by default gui Image controls may not have a "Power Sprite Animation" component, and this needs to be added for them to play animations.
 
string AnimBarHover [get, set]
 Gets/Sets the Sprite (or animation) for the slider's background when the slider is selected/hovered.
 
string AnimBarClick [get, set]
 Gets/Sets the Sprite (or animation) for the slider's background when the slider is clicked.
 
string AnimBarOff [get, set]
 Gets/Sets the Sprite (or animation) for the slider's background when the slider is Disabled (not Clickable).
 
string AnimHandle [get, set]
 Gets/Sets the Sprite (or animation) for the slider's handle. Note, that by default gui Image controls may not have a "Power Sprite Animation" component, and this needs to be added for them to play animations.
 
string AnimHandleHover [get, set]
 Gets/Sets the Sprite (or animation) for the slider's background when the slider is selected/hovered.
 
string AnimHandleClick [get, set]
 Gets/Sets the Sprite (or animation) for the slider's background when the slider is clicked.
 
string AnimHandleOff [get, set]
 Gets/Sets the Sprite (or animation) for the slider's background when the slider is Disabled (not Clickable).
 
new Color Color [get, set]
 Gets/Sets the color for the control.
 
Color ColorHover [get, set]
 Gets/Sets the color for the control when the button is selected/hovered over.
 
Color ColorClick [get, set]
 Gets/Sets the color for the control when the buttons is clicked.
 
Color ColorOff [get, set]
 Gets/Sets the color for the control when the button is disabled (when Clickable = false)
 
bool Clickable [get, set]
 Gets or Sets whether clicking on the object triggers an event.
 
float KeyboardIncrement [get, set]
 Gets/Sets the amount a slider will change when left/right keys are pressed on the keyboard (or controller)
 
- 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)
 
string Anim [get, set]
 Gets/Sets the Sprite (or animation) for the control. (if applicable). Note, that by default gui Image controls may not have a "Power Sprite Animation" component, and this needs to be added for them to play animations.
 

Additional Inherited Members

- 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

Gets/Sets the description text shown to players when they hover the mouse over the control.

Implements IGuiControl.

◆ Cursor

new string Cursor
getset

Gets or sets the cursor to show when hovering over the control (if it's clickable). If empty, default active cursor will be used.

Implements IGuiControl.

◆ Text

new string Text
getset

Gets/Sets the current text in the control.

Implements IGuiControl.

◆ Ratio

float Ratio
getset

How far along the bar the handle is. From 0 to 1.

Eg.

Settings.Volume = Slider("Volume").Ratio;

◆ AnimBar

string AnimBar
getset

Gets/Sets the Sprite (or animation) for the slider's background. Note, that by default gui Image controls may not have a "Power Sprite Animation" component, and this needs to be added for them to play animations.

◆ AnimBarHover

string AnimBarHover
getset

Gets/Sets the Sprite (or animation) for the slider's background when the slider is selected/hovered.

◆ AnimBarClick

string AnimBarClick
getset

Gets/Sets the Sprite (or animation) for the slider's background when the slider is clicked.

◆ AnimBarOff

string AnimBarOff
getset

Gets/Sets the Sprite (or animation) for the slider's background when the slider is Disabled (not Clickable).

See also
Clickable

◆ AnimHandle

string AnimHandle
getset

Gets/Sets the Sprite (or animation) for the slider's handle. Note, that by default gui Image controls may not have a "Power Sprite Animation" component, and this needs to be added for them to play animations.

◆ AnimHandleHover

string AnimHandleHover
getset

Gets/Sets the Sprite (or animation) for the slider's background when the slider is selected/hovered.

◆ AnimHandleClick

string AnimHandleClick
getset

Gets/Sets the Sprite (or animation) for the slider's background when the slider is clicked.

◆ AnimHandleOff

string AnimHandleOff
getset

Gets/Sets the Sprite (or animation) for the slider's background when the slider is Disabled (not Clickable).

See also
Clickable

◆ Color

new Color Color
getset

Gets/Sets the color for the control.

Implements IGuiControl.

◆ ColorHover

Color ColorHover
getset

Gets/Sets the color for the control when the button is selected/hovered over.

◆ ColorClick

Color ColorClick
getset

Gets/Sets the color for the control when the buttons is clicked.

◆ ColorOff

Color ColorOff
getset

Gets/Sets the color for the control when the button is disabled (when Clickable = false)

◆ Clickable

bool Clickable
getset

Gets or Sets whether clicking on the object triggers an event.

See also
AnimHandleOff
AnimBarOff

◆ KeyboardIncrement

float KeyboardIncrement
getset

Gets/Sets the amount a slider will change when left/right keys are pressed on the keyboard (or controller)