NGUI: Next-Gen UI kit
3.7.2
|
Extended progress bar that has backwards compatibility logic and adds interaction support. More...
Protected Member Functions | |
override void | Upgrade () |
Upgrade from legacy functionality. More... | |
override void | OnStart () |
Register an event listener. More... | |
void | OnPressBackground (GameObject go, bool isPressed) |
Position the scroll bar to be under the current touch. More... | |
void | OnDragBackground (GameObject go, Vector2 delta) |
Position the scroll bar to be under the current touch. More... | |
void | OnPressForeground (GameObject go, bool isPressed) |
Save the position of the foreground on press. More... | |
void | OnDragForeground (GameObject go, Vector2 delta) |
Drag the scroll bar in the specified direction. More... | |
void | OnKey (KeyCode key) |
Watch for key events and adjust the value accordingly. More... | |
![]() | |
void | Start () |
Register the event listeners. More... | |
void | Update () |
Update the value of the scroll bar if necessary. More... | |
void | OnValidate () |
Invalidate the scroll bar. More... | |
float | ScreenToValue (Vector2 screenPos) |
Drag the scroll bar by the specified on-screen amount. More... | |
virtual float | LocalToValue (Vector2 localPos) |
Calculate the value of the progress bar given the specified local position. More... | |
void | SetThumbPosition (Vector3 worldPos) |
Set the position of the thumb to the specified world coordinates. More... | |
Protected Attributes | |
bool | mInverted = false |
![]() | |
UIWidget | mBG |
UIWidget | mFG |
float | mValue = 1f |
FillDirection | mFill = FillDirection.LeftToRight |
Transform | mTrans |
bool | mIsDirty = false |
Camera | mCam |
float | mOffset = 0f |
Properties | |
float | sliderValue [get, set] |
bool | inverted [get, set] |
![]() | |
Transform | cachedTransform [get] |
Cached for speed. More... | |
Camera | cachedCamera [get] |
Camera used to draw the scroll bar. More... | |
UIWidget | foregroundWidget [get, set] |
Widget used for the foreground. More... | |
UIWidget | backgroundWidget [get, set] |
Widget used for the background. More... | |
FillDirection | fillDirection [get, set] |
The scroll bar's direction. More... | |
float | value [get, set] |
Modifiable value for the scroll bar, 0-1 range. More... | |
float | alpha [get, set] |
Allows to easily change the scroll bar's alpha, affecting both the foreground and the background sprite at once. More... | |
bool | isHorizontal [get] |
Whether the progress bar is horizontal in nature. Convenience function. More... | |
bool | isInverted [get] |
Whether the progress bar is inverted in its behaviour. Convenience function. More... | |
Additional Inherited Members | |
![]() | |
enum | FillDirection { FillDirection.LeftToRight, FillDirection.RightToLeft, FillDirection.BottomToTop, FillDirection.TopToBottom } |
![]() | |
delegate void | OnDragFinished () |
virtual void | ForceUpdate () |
Update the value of the scroll bar. More... | |
![]() | |
OnDragFinished | onDragFinished |
Delegate triggered when the scroll bar stops being dragged. Useful for things like centering on the closest valid object, for example. More... | |
Transform | thumb |
Object that acts as a thumb. More... | |
int | numberOfSteps = 0 |
Number of steps the slider should be divided into. For example 5 means possible values of 0, 0.25, 0.5, 0.75, and 1.0. More... | |
List< EventDelegate > | onChange = new List<EventDelegate>() |
Callbacks triggered when the scroll bar's value changes. More... | |
![]() | |
static UIProgressBar | current |
Current slider. This value is set prior to the callback function being triggered. More... | |
Extended progress bar that has backwards compatibility logic and adds interaction support.
|
protected |
Position the scroll bar to be under the current touch.
|
protected |
Drag the scroll bar in the specified direction.
|
protected |
Watch for key events and adjust the value accordingly.
|
protected |
Position the scroll bar to be under the current touch.
|
protected |
Save the position of the foreground on press.
|
protectedvirtual |
Register an event listener.
Reimplemented from UIProgressBar.
|
protectedvirtual |
Upgrade from legacy functionality.
Reimplemented from UIProgressBar.
|
protected |
|
getset |
|
getset |