NGUI: Next-Gen UI kit
3.7.2
|
Ever wanted to be able to auto-center on an object within a draggable panel? Attach this script to the container that has the objects to center on as its children. More...
Public Member Functions | |
delegate void | OnCenterCallback (GameObject centeredObject) |
void | Recenter () |
Recenter the draggable list on the center-most child. More... | |
void | CenterOn (Transform target) |
Center the panel on the specified target. More... | |
Public Attributes | |
float | springStrength = 8f |
The strength of the spring. More... | |
float | nextPageThreshold = 0f |
If set to something above zero, it will be possible to move to the next page after dragging past the specified threshold. More... | |
SpringPanel.OnFinished | onFinished |
Callback to be triggered when the centering operation completes. More... | |
OnCenterCallback | onCenter |
Callback triggered whenever the script begins centering on a new child object. More... | |
Properties | |
GameObject | centeredObject [get] |
Game object that the draggable panel is currently centered on. More... | |
Ever wanted to be able to auto-center on an object within a draggable panel? Attach this script to the container that has the objects to center on as its children.
void UICenterOnChild.CenterOn | ( | Transform | target | ) |
Center the panel on the specified target.
delegate void UICenterOnChild.OnCenterCallback | ( | GameObject | centeredObject | ) |
void UICenterOnChild.Recenter | ( | ) |
Recenter the draggable list on the center-most child.
float UICenterOnChild.nextPageThreshold = 0f |
If set to something above zero, it will be possible to move to the next page after dragging past the specified threshold.
OnCenterCallback UICenterOnChild.onCenter |
Callback triggered whenever the script begins centering on a new child object.
SpringPanel.OnFinished UICenterOnChild.onFinished |
Callback to be triggered when the centering operation completes.
float UICenterOnChild.springStrength = 8f |
The strength of the spring.
|
get |
Game object that the draggable panel is currently centered on.