C# Class UIScrollBar, Hero.Coli

Inheritance: MonoBehaviour
Afficher le fichier Open project: CyberCRI/Hero.Coli Class Usage Examples

Méthodes publiques

Свойство Type Description
onChange OnScrollBarChange
onDragFinished OnDragFinished

Méthodes publiques

Méthode Description
CenterOnPos ( Vector2 localPos ) : void

Move the scroll bar to be centered on the specified position.

ForceUpdate ( ) : void

Update the value of the scroll bar.

OnDragBackground ( GameObject go, Vector2 delta ) : void

Position the scroll bar to be under the current touch.

OnDragForeground ( GameObject go, Vector2 delta ) : void

Drag the scroll bar in the specified direction.

OnPressBackground ( GameObject go, bool isPressed ) : void

Position the scroll bar to be under the current touch.

OnPressForeground ( GameObject go, bool isPressed ) : void

Save the position of the foreground on press.

Reposition ( Vector2 screenPos ) : void

Drag the scroll bar by the specified on-screen amount.

Start ( ) : void

Register the event listeners.

Update ( ) : void

Update the value of the scroll bar if necessary.

Method Details

CenterOnPos() public méthode

Move the scroll bar to be centered on the specified position.
public CenterOnPos ( Vector2 localPos ) : void
localPos Vector2
Résultat void

ForceUpdate() public méthode

Update the value of the scroll bar.
public ForceUpdate ( ) : void
Résultat void

OnDragBackground() public méthode

Position the scroll bar to be under the current touch.
public OnDragBackground ( GameObject go, Vector2 delta ) : void
go GameObject
delta Vector2
Résultat void

OnDragForeground() public méthode

Drag the scroll bar in the specified direction.
public OnDragForeground ( GameObject go, Vector2 delta ) : void
go GameObject
delta Vector2
Résultat void

OnPressBackground() public méthode

Position the scroll bar to be under the current touch.
public OnPressBackground ( GameObject go, bool isPressed ) : void
go GameObject
isPressed bool
Résultat void

OnPressForeground() public méthode

Save the position of the foreground on press.
public OnPressForeground ( GameObject go, bool isPressed ) : void
go GameObject
isPressed bool
Résultat void

Reposition() public méthode

Drag the scroll bar by the specified on-screen amount.
public Reposition ( Vector2 screenPos ) : void
screenPos Vector2
Résultat void

Start() public méthode

Register the event listeners.
public Start ( ) : void
Résultat void

Update() public méthode

Update the value of the scroll bar if necessary.
public Update ( ) : void
Résultat void

Property Details

onChange public_oe property

Delegate triggered when the scroll bar has changed visibly.
public OnScrollBarChange onChange
Résultat OnScrollBarChange

onDragFinished public_oe property

Delegate triggered when the scroll bar stops being dragged. Useful for things like centering on the closest valid object, for example.
public OnDragFinished onDragFinished
Résultat OnDragFinished