C# Класс UIScrollBar, Hero.Coli

Наследование: MonoBehaviour
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
onChange OnScrollBarChange
onDragFinished OnDragFinished

Открытые методы

Метод Описание
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.

Описание методов

CenterOnPos() публичный Метод

Move the scroll bar to be centered on the specified position.
public CenterOnPos ( Vector2 localPos ) : void
localPos Vector2
Результат void

ForceUpdate() публичный Метод

Update the value of the scroll bar.
public ForceUpdate ( ) : void
Результат void

OnDragBackground() публичный Метод

Position the scroll bar to be under the current touch.
public OnDragBackground ( GameObject go, Vector2 delta ) : void
go GameObject
delta Vector2
Результат void

OnDragForeground() публичный Метод

Drag the scroll bar in the specified direction.
public OnDragForeground ( GameObject go, Vector2 delta ) : void
go GameObject
delta Vector2
Результат void

OnPressBackground() публичный Метод

Position the scroll bar to be under the current touch.
public OnPressBackground ( GameObject go, bool isPressed ) : void
go GameObject
isPressed bool
Результат void

OnPressForeground() публичный Метод

Save the position of the foreground on press.
public OnPressForeground ( GameObject go, bool isPressed ) : void
go GameObject
isPressed bool
Результат void

Reposition() публичный Метод

Drag the scroll bar by the specified on-screen amount.
public Reposition ( Vector2 screenPos ) : void
screenPos Vector2
Результат void

Start() публичный Метод

Register the event listeners.
public Start ( ) : void
Результат void

Update() публичный Метод

Update the value of the scroll bar if necessary.
public Update ( ) : void
Результат void

Описание свойств

onChange публичное свойство

Delegate triggered when the scroll bar has changed visibly.
public OnScrollBarChange onChange
Результат OnScrollBarChange

onDragFinished публичное свойство

Delegate triggered when the scroll bar stops being dragged. Useful for things like centering on the closest valid object, for example.
public OnDragFinished onDragFinished
Результат OnDragFinished