Difference between revisions of "GUIScrollBox"
From Virtual World Web Wiki
(Documentation for the GUIScrollBox class) |
(Documentation for the GUIScrollBox class) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | A component representing a scrollable surface. | ||
+ | |||
*'''Inherits class: [[GUIPanel]]''' | *'''Inherits class: [[GUIPanel]]''' | ||
* This is a JavaScript visible object | * This is a JavaScript visible object | ||
Line 6: | Line 8: | ||
===Properties=== | ===Properties=== | ||
:{{CSharp|bool AlwaysShowHorizontal {get; set;} }} | :{{CSharp|bool AlwaysShowHorizontal {get; set;} }} | ||
+ | :: | ||
+ | ::Should the horizontal scrollbar always be visible | ||
:{{CSharp|bool AlwaysShowVertical {get; set;} }} | :{{CSharp|bool AlwaysShowVertical {get; set;} }} | ||
+ | :: | ||
+ | ::Should the vertical scrollbar always be visible | ||
:{{CSharp|GUIRectTransform Content {get; set;} }} | :{{CSharp|GUIRectTransform Content {get; set;} }} | ||
+ | :: | ||
+ | ::Reference to the RectTransform for the content area | ||
:{{CSharp|float DecelerationRate {get; set;} }} | :{{CSharp|float DecelerationRate {get; set;} }} | ||
+ | :: | ||
+ | ::https://docs.unity3d.com/ScriptReference/UI.ScrollRect-decelerationRate.html | ||
:{{CSharp|float Elasticity {get; set;} }} | :{{CSharp|float Elasticity {get; set;} }} | ||
+ | :: | ||
+ | ::https://docs.unity3d.com/ScriptReference/UI.ScrollRect-elasticity.html | ||
:{{CSharp|int Height {get; set;} }} | :{{CSharp|int Height {get; set;} }} | ||
− | |||
:{{CSharp|bool HorizontalMouseScroll {get; set;} }} | :{{CSharp|bool HorizontalMouseScroll {get; set;} }} | ||
+ | :: | ||
+ | ::Should rolling the mousewheel cause horizontal or vertical scroll? | ||
:{{CSharp|GUISprite HorizontalScrollHandleSprite {get;} }} | :{{CSharp|GUISprite HorizontalScrollHandleSprite {get;} }} | ||
+ | :: | ||
+ | ::Reference to the sprite defining the backdrop of the horizontal scrollbar's handle | ||
:{{CSharp|GUISprite HorizontalScrollSprite {get;} }} | :{{CSharp|GUISprite HorizontalScrollSprite {get;} }} | ||
+ | :: | ||
+ | ::Reference to the sprite defining the backdrop of the horizontal scrollbar | ||
:{{CSharp|bool HorizontalScrollVisible {get;} }} | :{{CSharp|bool HorizontalScrollVisible {get;} }} | ||
+ | :: | ||
+ | ::Is the horizontal scroll bar currently visible | ||
:{{CSharp|GUIRectTransform HorizontalScrollbar {get; set;} }} | :{{CSharp|GUIRectTransform HorizontalScrollbar {get; set;} }} | ||
+ | :: | ||
+ | ::Reference to the RectTransform for the horizontal scrollbar | ||
+ | |||
+ | :{{CSharp|float HorizontalScrollbarSpacing {get; set;} }} | ||
:{{CSharp|bool HorizontalScrolling {get; set;} }} | :{{CSharp|bool HorizontalScrolling {get; set;} }} | ||
+ | :: | ||
+ | ::https://docs.unity3d.com/ScriptReference/UI.ScrollRect-horizontal.html | ||
:{{CSharp|bool Inertia {get; set;} }} | :{{CSharp|bool Inertia {get; set;} }} | ||
+ | :: | ||
+ | ::https://docs.unity3d.com/ScriptReference/UI.ScrollRect-inertia.html | ||
:{{CSharp|MovementType MovementType {get; set;} }} | :{{CSharp|MovementType MovementType {get; set;} }} | ||
+ | :: | ||
+ | ::https://docs.unity3d.com/ScriptReference/UI.ScrollRect-movementType.html | ||
:{{CSharp|bool PreferContentHeight {get; set;} }} | :{{CSharp|bool PreferContentHeight {get; set;} }} | ||
+ | :: | ||
+ | ::Use the ContentHeight as this ScrollBox's preferredHeight | ||
:{{CSharp|bool PreferContentWidth {get; set;} }} | :{{CSharp|bool PreferContentWidth {get; set;} }} | ||
+ | :: | ||
+ | ::Use the ContentWidth as this ScrollBox's preferredWidth | ||
:{{CSharp|JSVector2 ScrollPos {get; set;} }} | :{{CSharp|JSVector2 ScrollPos {get; set;} }} | ||
+ | :: | ||
+ | ::The normalized scroll position of this surface from (0,0) to (1,1) | ||
:{{CSharp|float ScrollSpeed {get; set;} }} | :{{CSharp|float ScrollSpeed {get; set;} }} | ||
+ | :: | ||
+ | ::https://docs.unity3d.com/ScriptReference/UI.ScrollRect-scrollSensitivity.html | ||
:{{CSharp|GUISprite VerticalScrollHandleSprite {get;} }} | :{{CSharp|GUISprite VerticalScrollHandleSprite {get;} }} | ||
+ | :: | ||
+ | ::Reference to the sprite defining the backdrop of the vertical scrollbar's handle | ||
:{{CSharp|GUISprite VerticalScrollSprite {get;} }} | :{{CSharp|GUISprite VerticalScrollSprite {get;} }} | ||
+ | :: | ||
+ | ::Reference to the sprite defining the backdrop of the vertical scrollbar | ||
:{{CSharp|bool VerticalScrollVisible {get;} }} | :{{CSharp|bool VerticalScrollVisible {get;} }} | ||
+ | :: | ||
+ | ::Is the horizontal scroll bar currently visible | ||
:{{CSharp|GUIRectTransform VerticalScrollbar {get; set;} }} | :{{CSharp|GUIRectTransform VerticalScrollbar {get; set;} }} | ||
+ | :: | ||
+ | ::Reference to the RectTransform for the vertical scrollbar | ||
+ | |||
+ | :{{CSharp|float VerticalScrollbarSpacing {get; set;} }} | ||
:{{CSharp|bool VerticalScrolling {get; set;} }} | :{{CSharp|bool VerticalScrolling {get; set;} }} | ||
+ | :: | ||
+ | ::https://docs.unity3d.com/ScriptReference/UI.ScrollRect-vertical.html | ||
:{{CSharp|int Width {get; set;} }} | :{{CSharp|int Width {get; set;} }} | ||
− | |||
===Events=== | ===Events=== | ||
:{{CSharp|OnScroll()}} | :{{CSharp|OnScroll()}} | ||
+ | :: | ||
+ | ::Event called whenever this scrollbox changes its scroll position. | ||
__NOTOC____NOEDITSECTION__ | __NOTOC____NOEDITSECTION__ |
Latest revision as of 12:11, 30 April 2019
A component representing a scrollable surface.
- Inherits class: GUIPanel
- This is a JavaScript visible object
Remarks [edit]
Properties
- bool AlwaysShowHorizontal {get; set;}
- Should the horizontal scrollbar always be visible
- bool AlwaysShowVertical {get; set;}
- Should the vertical scrollbar always be visible
- GUIRectTransform Content {get; set;}
- Reference to the RectTransform for the content area
- float DecelerationRate {get; set;}
- float Elasticity {get; set;}
- int Height {get; set;}
- bool HorizontalMouseScroll {get; set;}
- Should rolling the mousewheel cause horizontal or vertical scroll?
- GUISprite HorizontalScrollHandleSprite {get;}
- Reference to the sprite defining the backdrop of the horizontal scrollbar's handle
- GUISprite HorizontalScrollSprite {get;}
- Reference to the sprite defining the backdrop of the horizontal scrollbar
- bool HorizontalScrollVisible {get;}
- Is the horizontal scroll bar currently visible
- GUIRectTransform HorizontalScrollbar {get; set;}
- Reference to the RectTransform for the horizontal scrollbar
- float HorizontalScrollbarSpacing {get; set;}
- bool HorizontalScrolling {get; set;}
- bool Inertia {get; set;}
- MovementType MovementType {get; set;}
- bool PreferContentHeight {get; set;}
- Use the ContentHeight as this ScrollBox's preferredHeight
- bool PreferContentWidth {get; set;}
- Use the ContentWidth as this ScrollBox's preferredWidth
- JSVector2 ScrollPos {get; set;}
- The normalized scroll position of this surface from (0,0) to (1,1)
- float ScrollSpeed {get; set;}
- GUISprite VerticalScrollHandleSprite {get;}
- Reference to the sprite defining the backdrop of the vertical scrollbar's handle
- GUISprite VerticalScrollSprite {get;}
- Reference to the sprite defining the backdrop of the vertical scrollbar
- bool VerticalScrollVisible {get;}
- Is the horizontal scroll bar currently visible
- GUIRectTransform VerticalScrollbar {get; set;}
- Reference to the RectTransform for the vertical scrollbar
- float VerticalScrollbarSpacing {get; set;}
- bool VerticalScrolling {get; set;}
- int Width {get; set;}
Events
- OnScroll()
- Event called whenever this scrollbox changes its scroll position.