Scrollable Area Control. Can be actually by changing Value, external scrollbar or swipe gesture. More...
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. |
Scrollable Area Control. Can be actually by changing Value, external scrollbar or swipe gesture.
XAxis - horizontal, YAxis - vertical.
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.
bool tk2dUIScrollableArea.allowScrollWheel = true |
If mouse will is enabled, hover needs to be active.
bool tk2dUIScrollableArea.allowSwipeScrolling = true |
If swipe (gesture) scrolling is enabled.
Used to record swipe scrolling events.
GameObject tk2dUIScrollableArea.contentContainer |
Transform the will be moved to scroll content. All content needs to be a child of this Transform.
Axes tk2dUIScrollableArea.scrollAxes = Axes.YAxis |
Axes scrolling will happen on.
Scrollbar to be attached. Not required.
float tk2dUIScrollableArea.Value [get, set] |
Scroll position percent 0-1.
System.Action<tk2dUIScrollableArea> tk2dUIScrollableArea.OnScroll |
If scrollable area is being scrolled.