NGUI: Next-Gen UI kit
3.7.2
|
Simple progress bar that fills itself based on the specified value. More...
Public Types | |
enum | FillDirection { FillDirection.LeftToRight, FillDirection.RightToLeft, FillDirection.BottomToTop, FillDirection.TopToBottom } |
Public Member Functions | |
delegate void | OnDragFinished () |
virtual void | ForceUpdate () |
Update the value of the scroll bar. More... | |
Public Attributes | |
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 Public Attributes | |
static UIProgressBar | current |
Current slider. This value is set prior to the callback function being triggered. More... | |
Protected Member Functions | |
void | Start () |
Register the event listeners. More... | |
virtual void | Upgrade () |
Used to upgrade from legacy functionality. More... | |
virtual void | OnStart () |
Functionality for derived classes. 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 | |
UIWidget | mBG |
UIWidget | mFG |
float | mValue = 1f |
FillDirection | mFill = FillDirection.LeftToRight |
Transform | mTrans |
bool | mIsDirty = false |
Camera | mCam |
float | mOffset = 0f |
Properties | |
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... | |
Simple progress bar that fills itself based on the specified value.
|
virtual |
Update the value of the scroll bar.
Reimplemented in UIScrollBar.
|
protectedvirtual |
Calculate the value of the progress bar given the specified local position.
Reimplemented in UIScrollBar.
delegate void UIProgressBar.OnDragFinished | ( | ) |
|
protectedvirtual |
Functionality for derived classes.
Reimplemented in UIScrollBar, and UISlider.
|
protected |
Invalidate the scroll bar.
|
protected |
Drag the scroll bar by the specified on-screen amount.
|
protected |
Set the position of the thumb to the specified world coordinates.
|
protected |
Register the event listeners.
|
protected |
Update the value of the scroll bar if necessary.
|
protectedvirtual |
Used to upgrade from legacy functionality.
Reimplemented in UIScrollBar, and UISlider.
|
static |
Current slider. This value is set prior to the callback function being triggered.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
int UIProgressBar.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.
List<EventDelegate> UIProgressBar.onChange = new List<EventDelegate>() |
Callbacks triggered when the scroll bar's value changes.
OnDragFinished UIProgressBar.onDragFinished |
Delegate triggered when the scroll bar stops being dragged. Useful for things like centering on the closest valid object, for example.
Transform UIProgressBar.thumb |
Object that acts as a thumb.
|
getset |
Allows to easily change the scroll bar's alpha, affecting both the foreground and the background sprite at once.
|
getset |
Widget used for the background.
|
get |
Camera used to draw the scroll bar.
|
get |
Cached for speed.
|
getset |
The scroll bar's direction.
|
getset |
Widget used for the foreground.
|
getprotected |
Whether the progress bar is horizontal in nature. Convenience function.
|
getprotected |
Whether the progress bar is inverted in its behaviour. Convenience function.
|
getset |
Modifiable value for the scroll bar, 0-1 range.