NGUI: Next-Gen UI kit  3.7.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros
UICenterOnChild Class Reference

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...

Inheritance diagram for UICenterOnChild:

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...
 

Detailed Description

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.

Member Function Documentation

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.

Member Data Documentation

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.

Property Documentation

GameObject UICenterOnChild.centeredObject
get

Game object that the draggable panel is currently centered on.


The documentation for this class was generated from the following file: