tk2dUIScrollableArea Class Reference

Scrollable Area Control. Can be actually by changing Value, external scrollbar or swipe gesture. More...

List of all members.

Public Types

enum  Axes
 XAxis - horizontal, YAxis - vertical. More...

Public Member Functions

void SetScrollPercentWithoutEvent (float newScrollPercent)
 Manually set scrolling percent without firing OnScroll event.
float MeasureContentLength ()
 Measures the content length. This isn't very fast, so if you know the content length it is often more efficient to tell it rather than asking it to measure the content. Returns the height in Unity units, of everything under the Content contentContainer.

Public Attributes

GameObject contentContainer
 Transform the will be moved to scroll content. All content needs to be a child of this Transform.
tk2dUIScrollbar scrollBar
 Scrollbar to be attached. Not required.
tk2dUIItem backgroundUIItem
 Used to record swipe scrolling events.
Axes scrollAxes = Axes.YAxis
 Axes scrolling will happen on.
bool allowSwipeScrolling = true
 If swipe (gesture) scrolling is enabled.
bool allowScrollWheel = true
 If mouse will is enabled, hover needs to be active.

Properties

float Value [get, set]
 Scroll position percent 0-1.

Events

System.Action
< tk2dUIScrollableArea
OnScroll
 If scrollable area is being scrolled.

Detailed Description

Scrollable Area Control. Can be actually by changing Value, external scrollbar or swipe gesture.


Member Enumeration Documentation

XAxis - horizontal, YAxis - vertical.


Member Function Documentation

Measures the content length. This isn't very fast, so if you know the content length it is often more efficient to tell it rather than asking it to measure the content. Returns the height in Unity units, of everything under the Content contentContainer.

void tk2dUIScrollableArea.SetScrollPercentWithoutEvent ( float  newScrollPercent)

Manually set scrolling percent without firing OnScroll event.


Member Data Documentation

If mouse will is enabled, hover needs to be active.

If swipe (gesture) scrolling is enabled.

Used to record swipe scrolling events.

Transform the will be moved to scroll content. All content needs to be a child of this Transform.

Axes scrolling will happen on.

Scrollbar to be attached. Not required.


Property Documentation

float tk2dUIScrollableArea.Value [get, set]

Scroll position percent 0-1.


Event Documentation

If scrollable area is being scrolled.