A class to handle a carousel of UI elements, placed in an HorizontalLayoutGroup. All elements of the carousel need to have the same width.
More...
A class to handle a carousel of UI elements, placed in an HorizontalLayoutGroup. All elements of the carousel need to have the same width.
◆ CanMoveLeft()
virtual bool MoreMountains.MMInterface.MMCarousel.CanMoveLeft |
( |
| ) |
|
|
virtual |
◆ CanMoveRight()
virtual bool MoreMountains.MMInterface.MMCarousel.CanMoveRight |
( |
| ) |
|
|
virtual |
Determines whether this carousel can move right.
- Returns
true
if this instance can move right; otherwise, false
.
◆ DeterminePosition()
virtual Vector2 MoreMountains.MMInterface.MMCarousel.DeterminePosition |
( |
| ) |
|
|
protectedvirtual |
Determines the target position based on the current index value.
- Returns
- The position.
◆ HandleButtons()
virtual void MoreMountains.MMInterface.MMCarousel.HandleButtons |
( |
| ) |
|
|
protectedvirtual |
Handles the buttons, enabling and disabling them if needed
◆ HandleFocus()
virtual void MoreMountains.MMInterface.MMCarousel.HandleFocus |
( |
| ) |
|
|
protectedvirtual |
◆ Initialization()
virtual void MoreMountains.MMInterface.MMCarousel.Initialization |
( |
| ) |
|
|
protectedvirtual |
Initializes the carousel, grabs the rect transform, computes the elements' dimensions, and inits position
◆ LerpPosition()
virtual void MoreMountains.MMInterface.MMCarousel.LerpPosition |
( |
| ) |
|
|
protectedvirtual |
Lerps the carousel's position.
◆ MoveLeft()
virtual void MoreMountains.MMInterface.MMCarousel.MoveLeft |
( |
| ) |
|
|
virtual |
Moves the carousel to the left.
◆ MoveRight()
virtual void MoreMountains.MMInterface.MMCarousel.MoveRight |
( |
| ) |
|
|
virtual |
Moves the carousel to the right.
◆ MoveToCurrentIndex()
virtual void MoreMountains.MMInterface.MMCarousel.MoveToCurrentIndex |
( |
| ) |
|
|
protectedvirtual |
Initiates movement to the current index
◆ Start()
virtual void MoreMountains.MMInterface.MMCarousel.Start |
( |
| ) |
|
|
protectedvirtual |
On Start we initialize our carousel
◆ Update()
virtual void MoreMountains.MMInterface.MMCarousel.Update |
( |
| ) |
|
|
protectedvirtual |
On Update we move the carousel if required, and handles button states
◆ _contentLength
int MoreMountains.MMInterface.MMCarousel._contentLength = 0 |
|
protected |
◆ _elementWidth
float MoreMountains.MMInterface.MMCarousel._elementWidth |
|
protected |
◆ _initialPosition
Vector2 MoreMountains.MMInterface.MMCarousel._initialPosition |
|
protected |
◆ _lerping
bool MoreMountains.MMInterface.MMCarousel._lerping = false |
|
protected |
◆ _lerpStartedTimestamp
float MoreMountains.MMInterface.MMCarousel._lerpStartedTimestamp |
|
protected |
◆ _rectTransform
RectTransform MoreMountains.MMInterface.MMCarousel._rectTransform |
|
protected |
◆ _spacing
float MoreMountains.MMInterface.MMCarousel._spacing |
|
protected |
◆ _startPosition
Vector2 MoreMountains.MMInterface.MMCarousel._startPosition |
|
protected |
◆ _targetPosition
Vector2 MoreMountains.MMInterface.MMCarousel._targetPosition |
|
protected |
◆ Content
HorizontalLayoutGroup MoreMountains.MMInterface.MMCarousel.Content |
the layout group that contains all carousel's elements
◆ CurrentIndex
int MoreMountains.MMInterface.MMCarousel.CurrentIndex = 0 |
the initial and current index
◆ ForceMouseVisible
bool MoreMountains.MMInterface.MMCarousel.ForceMouseVisible = true |
if this is true, the mouse will be forced back on Start
◆ InitialFocus
GameObject MoreMountains.MMInterface.MMCarousel.InitialFocus |
Bind here the carousel item that should have focus initially.
◆ LeftButton
the button that moves the carousel to the left
◆ MoveDuration
float MoreMountains.MMInterface.MMCarousel.MoveDuration = 0.05f |
the duration (in seconds) of the carousel's movement
◆ Pagination
int MoreMountains.MMInterface.MMCarousel.Pagination = 1 |
the number of items in the carousel that should be moved every time
◆ RightButton
the button that moves the carousel to the right
◆ ThresholdInPercent
float MoreMountains.MMInterface.MMCarousel.ThresholdInPercent = 1f |
the percentage of distance that, when reached, will stop movement
◆ UICamera
Camera MoreMountains.MMInterface.MMCarousel.UICamera |
The documentation for this class was generated from the following file:
- Assets/InfiniteRunnerEngine/ThirdParty/MoreMountains/MMInterface/Common/Scripts/MMCarousel.cs