C# Class UIScrollView, TheUnseen

Inheritance: MonoBehaviour
Afficher le fichier Open project: henryj41043/TheUnseen Class Usage Examples

Méthodes publiques

Свойство Type Description
contentPivot UIWidget.Pivot
customMovement Vector2
disableDragIfFits bool
dragEffect DragEffect
horizontalScrollBar UIProgressBar,
iOSDragEmulation bool
list BetterList
momentumAmount float
movement Movement,
onDragFinished OnDragFinished
restrictWithinPanel bool
scrollWheelFactor float
showScrollBars ShowCondition
smoothDragStart bool
verticalScrollBar UIProgressBar,

Méthodes publiques

Méthode Description
DisableSpring ( ) : void

Disable the spring movement.

Drag ( ) : void

Drag the object along the plane.

MoveAbsolute ( Vector3 absolute ) : void

Move the scroll view by the specified amount.

MoveRelative ( Vector3 relative ) : void

Move the scroll view by the specified amount.

OnScrollBar ( ) : void

Triggered by the scroll bars when they change.

Press ( bool pressed ) : void

Create a plane on which we will be performing the dragging.

RestrictWithinBounds ( bool instant ) : bool

Restrict the scroll view's contents to be within the scroll view's bounds.

RestrictWithinBounds ( bool instant, bool horizontal, bool vertical ) : bool

Restrict the scroll view's contents to be within the scroll view's bounds.

Scroll ( float delta ) : void

If the object should support the scroll wheel, do it.

SetDragAmount ( float x, float y, bool updateScrollbars ) : void

Changes the drag amount of the scroll view to the specified 0-1 range values. (0, 0) is the top-left corner, (1, 1) is the bottom-right.

UpdatePosition ( ) : void

Call this function after you adjust the scroll view's bounds if you want it to maintain the current scrolled position

UpdateScrollbars ( bool recalculateBounds ) : void

Update the values of the associated scroll bars.

Private Methods

Méthode Description
Awake ( ) : void

Cache the transform and the panel.

LateUpdate ( ) : void

Apply the dragging momentum.

OnDisable ( ) : void
OnDrawGizmos ( ) : void

Draw a visible orange outline of the bounds.

OnEnable ( ) : void
ResetPosition ( ) : void
Start ( ) : void

Set the initial drag value and register the listener delegates.

UpdateScrollbars ( UIScrollBar, sb, float contentMin, float contentMax, float contentSize, float viewSize, bool inverted ) : void

Helper function used in UpdateScrollbars(float) function above.

Method Details

DisableSpring() public méthode

Disable the spring movement.
public DisableSpring ( ) : void
Résultat void

Drag() public méthode

Drag the object along the plane.
public Drag ( ) : void
Résultat void

MoveAbsolute() public méthode

Move the scroll view by the specified amount.
public MoveAbsolute ( Vector3 absolute ) : void
absolute Vector3
Résultat void

MoveRelative() public méthode

Move the scroll view by the specified amount.
public MoveRelative ( Vector3 relative ) : void
relative Vector3
Résultat void

OnScrollBar() public méthode

Triggered by the scroll bars when they change.
public OnScrollBar ( ) : void
Résultat void

Press() public méthode

Create a plane on which we will be performing the dragging.
public Press ( bool pressed ) : void
pressed bool
Résultat void

RestrictWithinBounds() public méthode

Restrict the scroll view's contents to be within the scroll view's bounds.
public RestrictWithinBounds ( bool instant ) : bool
instant bool
Résultat bool

RestrictWithinBounds() public méthode

Restrict the scroll view's contents to be within the scroll view's bounds.
public RestrictWithinBounds ( bool instant, bool horizontal, bool vertical ) : bool
instant bool
horizontal bool
vertical bool
Résultat bool

Scroll() public méthode

If the object should support the scroll wheel, do it.
public Scroll ( float delta ) : void
delta float
Résultat void

SetDragAmount() public méthode

Changes the drag amount of the scroll view to the specified 0-1 range values. (0, 0) is the top-left corner, (1, 1) is the bottom-right.
public SetDragAmount ( float x, float y, bool updateScrollbars ) : void
x float
y float
updateScrollbars bool
Résultat void

UpdatePosition() public méthode

Call this function after you adjust the scroll view's bounds if you want it to maintain the current scrolled position
public UpdatePosition ( ) : void
Résultat void

UpdateScrollbars() public méthode

Update the values of the associated scroll bars.
public UpdateScrollbars ( bool recalculateBounds ) : void
recalculateBounds bool
Résultat void

Property Details

contentPivot public_oe property

Content's pivot point -- where it originates from by default.
public UIWidget.Pivot contentPivot
Résultat UIWidget.Pivot

customMovement public_oe property

Custom movement, if the 'movement' field is set to 'Custom'.
public Vector2 customMovement
Résultat Vector2

disableDragIfFits public_oe property

Whether dragging will be disabled if the contents fit.
public bool disableDragIfFits
Résultat bool

dragEffect public_oe property

Effect to apply when dragging.
public DragEffect dragEffect
Résultat DragEffect

horizontalScrollBar public_oe property

Horizontal scrollbar used for visualization.
public UIProgressBar, horizontalScrollBar
Résultat UIProgressBar,

iOSDragEmulation public_oe property

Whether to use iOS drag emulation, where the content only drags at half the speed of the touch/mouse movement when the content edge is within the clipping area.
public bool iOSDragEmulation
Résultat bool

list static_oe public_oe property

static public BetterList list
Résultat BetterList

momentumAmount public_oe property

How much momentum gets applied when the press is released after dragging.
public float momentumAmount
Résultat float

movement public_oe property

Type of movement allowed by the scroll view.
public Movement, movement
Résultat Movement,

onDragFinished public_oe property

Event callback to trigger when the drag process finished. Can be used for additional effects, such as centering on some object.
public OnDragFinished onDragFinished
Résultat OnDragFinished

restrictWithinPanel public_oe property

Whether the dragging will be restricted to be within the scroll view's bounds.
public bool restrictWithinPanel
Résultat bool

scrollWheelFactor public_oe property

Effect the scroll wheel will have on the momentum.
public float scrollWheelFactor
Résultat float

showScrollBars public_oe property

Condition that must be met for the scroll bars to become visible.
public ShowCondition showScrollBars
Résultat ShowCondition

smoothDragStart public_oe property

Whether the drag operation will be started smoothly, or if if it will be precise (but will have a noticeable "jump").
public bool smoothDragStart
Résultat bool

verticalScrollBar public_oe property

Vertical scrollbar used for visualization.
public UIProgressBar, verticalScrollBar
Résultat UIProgressBar,