UIPageLayout
Positions sibling UI elements as full-size pages in a single row or column that users can scroll or animate through one page at a time.
| Memory category | Instances |
|---|
Member index 17
Description
Creates a paged viewing window, like the home screen of a mobile device. You can use a UIPageLayout by parenting it to a GuiObject. The UIPageLayout will then apply itself to all of its GuiObject siblings.
History 81
- 731 Change Default of TweenTime from to 1
- 731 Change Default of TouchInputEnabled from to true
- 731 Change Default of ScrollWheelInputEnabled from to true
- 731 Change Default of Padding from to UDim(0, 0)
- 731 Change Default of GamepadInputEnabled from to true
- 731 Change Default of EasingStyle from to Back
- 731 Change Default of EasingDirection from to Out
- 731 Change Default of CurrentPage from to
- 731 Change Default of Circular from to false
- 731 Change Default of Animated from to true
- 726 Change Default of TweenTime from 1 to
- 726 Change Default of TouchInputEnabled from true to
- 726 Change Default of ScrollWheelInputEnabled from true to
- 726 Change Default of Padding from UDim(0, 0) to
- 726 Change Default of GamepadInputEnabled from true to
- 726 Change Default of EasingStyle from Back to
- 726 Change Default of EasingDirection from Out to
- 726 Change Default of CurrentPage from to
- 726 Change Default of Circular from false to
- 726 Change Default of Animated from true to
- 573 Change ReturnType of Previous from void to null
- 573 Change ReturnType of Next from void to null
- 573 Change ReturnType of JumpToIndex from void to null
- 573 Change ReturnType of JumpTo from void to null
- 553 Change Default of TweenTime from to 1
- 553 Change Default of TouchInputEnabled from to true
- 553 Change Default of ScrollWheelInputEnabled from to true
- 553 Change Default of Padding from to UDim(0, 0)
- 553 Change Default of GamepadInputEnabled from to true
- 553 Change Default of EasingStyle from to Back
- 553 Change Default of EasingDirection from to Out
- 553 Change Default of CurrentPage from to
- 553 Change Default of Circular from to false
- 553 Change Default of Animated from to true
- 486 Change ThreadSafety of TweenTime from ReadOnly to ReadSafe
- 486 Change ThreadSafety of TouchInputEnabled from ReadOnly to ReadSafe
- 486 Change ThreadSafety of ScrollWheelInputEnabled from ReadOnly to ReadSafe
- 486 Change ThreadSafety of Padding from ReadOnly to ReadSafe
- 486 Change ThreadSafety of GamepadInputEnabled from ReadOnly to ReadSafe
- 486 Change ThreadSafety of EasingStyle from ReadOnly to ReadSafe
- 486 Change ThreadSafety of EasingDirection from ReadOnly to ReadSafe
- 486 Change ThreadSafety of CurrentPage from ReadOnly to ReadSafe
- 486 Change ThreadSafety of Circular from ReadOnly to ReadSafe
- 486 Change ThreadSafety of Animated from ReadOnly to ReadSafe
- 462 Change ThreadSafety of Stopped from to Unsafe
- 462 Change ThreadSafety of PageLeave from to Unsafe
- 462 Change ThreadSafety of PageEnter from to Unsafe
- 462 Change ThreadSafety of Previous from to Unsafe
- 462 Change ThreadSafety of Next from to Unsafe
- 462 Change ThreadSafety of JumpToIndex from to Unsafe
- 462 Change ThreadSafety of JumpTo from to Unsafe
- 462 Change ThreadSafety of TweenTime from to ReadOnly
- 462 Change ThreadSafety of TouchInputEnabled from to ReadOnly
- 462 Change ThreadSafety of ScrollWheelInputEnabled from to ReadOnly
- 462 Change ThreadSafety of Padding from to ReadOnly
- 462 Change ThreadSafety of GamepadInputEnabled from to ReadOnly
- 462 Change ThreadSafety of EasingStyle from to ReadOnly
- 462 Change ThreadSafety of EasingDirection from to ReadOnly
- 462 Change ThreadSafety of CurrentPage from to ReadOnly
- 462 Change ThreadSafety of Circular from to ReadOnly
- 462 Change ThreadSafety of Animated from to ReadOnly
- 334 Change ValueType of CurrentPage from Instance to GuiObject
- 329 Change ValueType of CurrentPage from Object to Instance
- 310 Add TouchInputEnabled
- 310 Add ScrollWheelInputEnabled
- 310 Add GamepadInputEnabled
- 284 Add Stopped
- 284 Add PageLeave
- 284 Add PageEnter
- 284 Add Previous
- 284 Add Next
- 284 Add JumpToIndex
- 284 Add JumpTo
- 284 Add TweenTime
- 284 Add Padding
- 284 Add EasingStyle
- 284 Add EasingDirection
- 284 Add CurrentPage
- 284 Add Circular
- 284 Add Animated
- 284 Add UIPageLayout
Members 17
Animated
| Type | Default | |
|---|---|---|
| bool | true | |
When set to true, page transitions use the configured
UIPageLayout.EasingStyle, UIPageLayout.EasingDirection,
and UIPageLayout.TweenTime to animate the movement between pages.
When set to false, page transitions are instantaneous. Defaults to true.
| Thread safety | ReadSafe |
|---|---|
| Category | Appearance |
| Loaded/Saved | true |
Circular
| Type | Default | |
|---|---|---|
| bool | false | |
When set to true, navigating past the last page wraps around to the first
page, and navigating before the first page wraps to the last. Animated
transitions take the shortest rotational path around the wrap boundary.
When set to false, navigation stops at the first and last pages. Defaults
to false.
| Thread safety | ReadSafe |
|---|---|
| Category | Appearance |
| Loaded/Saved | true |
CurrentPage
| Type | Default | |
|---|---|---|
| GuiObject | ||
A read-only reference to the GuiObject sibling that is currently displayed or is the target of an in-progress animation. The layout updates this property when pages change via UIPageLayout:Next(), UIPageLayout:Previous(), UIPageLayout:JumpTo(), UIPageLayout:JumpToIndex(), or through user input (touch swipe, scroll wheel, or gamepad). If no page has been explicitly navigated to, it defaults to the first visible GuiObject sibling in layout order.
| Thread safety | ReadSafe |
|---|---|
| Category | Data |
| Loaded/Saved | false/true |
History 8
- 731 Change Default of CurrentPage from to
- 726 Change Default of CurrentPage from to
- 553 Change Default of CurrentPage from to
- 486 Change ThreadSafety of CurrentPage from ReadOnly to ReadSafe
- 462 Change ThreadSafety of CurrentPage from to ReadOnly
- 334 Change ValueType of CurrentPage from Instance to GuiObject
- 329 Change ValueType of CurrentPage from Object to Instance
- 284 Add CurrentPage
EasingDirection
| Type | Default | |
|---|---|---|
| EasingDirection | Out | |
Determines the direction component of the easing function applied during animated page transitions. Combined with UIPageLayout.EasingStyle to form the full tween curve. Only takes effect when UIPageLayout.Animated is true. Defaults to EasingDirection.Out.
| Thread safety | ReadSafe |
|---|---|
| Category | Appearance |
| Loaded/Saved | true |
History 6
- 731 Change Default of EasingDirection from to Out
- 726 Change Default of EasingDirection from Out to
- 553 Change Default of EasingDirection from to Out
- 486 Change ThreadSafety of EasingDirection from ReadOnly to ReadSafe
- 462 Change ThreadSafety of EasingDirection from to ReadOnly
- 284 Add EasingDirection
EasingStyle
| Type | Default | |
|---|---|---|
| EasingStyle | Back | |
Determines the easing curve applied during animated page transitions. Combined with UIPageLayout.EasingDirection to form the full tween curve. Only takes effect when UIPageLayout.Animated is true. Defaults to EasingStyle.Back.
| Thread safety | ReadSafe |
|---|---|
| Category | Appearance |
| Loaded/Saved | true |
History 6
- 731 Change Default of EasingStyle from to Back
- 726 Change Default of EasingStyle from Back to
- 553 Change Default of EasingStyle from to Back
- 486 Change ThreadSafety of EasingStyle from ReadOnly to ReadSafe
- 462 Change ThreadSafety of EasingStyle from to ReadOnly
- 284 Add EasingStyle
GamepadInputEnabled
| Type | Default | |
|---|---|---|
| bool | true | |
When set to true, the layout overrides sibling
GuiObject.NextSelectionLeft and
GuiObject.NextSelectionRight (for horizontal fill direction) or
GuiObject.NextSelectionUp and GuiObject.NextSelectionDown
(for vertical fill direction) so that gamepad directional navigation moves
between pages. Additionally, the L1 and R1 bumper buttons advance to the
previous and next page respectively. When false, gamepad input does not
interact with the layout. Defaults to true.
| Thread safety | ReadSafe |
|---|---|
| Category | Input |
| Loaded/Saved | true |
History 6
- 731 Change Default of GamepadInputEnabled from to true
- 726 Change Default of GamepadInputEnabled from true to
- 553 Change Default of GamepadInputEnabled from to true
- 486 Change ThreadSafety of GamepadInputEnabled from ReadOnly to ReadSafe
- 462 Change ThreadSafety of GamepadInputEnabled from to ReadOnly
- 310 Add GamepadInputEnabled
JumpTo
| Parameters (1) | ||
|---|---|---|
| page | Instance | |
| Returns (1) | ||
| null | ||
Navigates to a specific page within the layout. The page argument must
be a GuiObject that is a visible sibling managed by this layout;
passing nil or an instance that is not part of the layout throws an
error. Sets UIPageLayout.CurrentPage to the target and animates
the transition (or jumps instantly if UIPageLayout.Animated is
false). When UIPageLayout.Circular is true, the animation takes
the shortest rotational path to the target page.
| Thread safety | Unsafe |
|---|
JumpToIndex
| Parameters (1) | ||
|---|---|---|
| index | int | |
| Returns (1) | ||
| null | ||
Navigates to the page at the given zero-based index in layout order. If
the index is within the valid range (0 to page count minus 1), this method
behaves like UIPageLayout:JumpTo(). Out-of-bounds indices are
wrapped modulo the page count to determine the final page.
| Thread safety | Unsafe |
|---|
History 3
- 573 Change ReturnType of JumpToIndex from void to null
- 462 Change ThreadSafety of JumpToIndex from to Unsafe
- 284 Add JumpToIndex
Next
| Parameters (0) | ||
|---|---|---|
| No parameters. | ||
| Returns (1) | ||
| null | ||
Advances UIPageLayout.CurrentPage to the next page in layout order and animates the transition (or jumps instantly if UIPageLayout.Animated is false). If the current page is already the last page and UIPageLayout.Circular is false, this method does nothing. If UIPageLayout.Circular is true, it wraps from the last page to the first.
| Thread safety | Unsafe |
|---|
Padding
| Type | Default | |
|---|---|---|
| UDim | 0, 0 | |
Determines the amount that pages are separated from each other by. Can be set either using scale (Percentage of parent's size in the current direction) or offset (a static spacing value, similar to pixel size).
| Thread safety | ReadSafe |
|---|---|
| Category | Appearance |
| Loaded/Saved | true |
PageEnter
| Parameters (1) | |
|---|---|
| page | Instance |
Fires when a sibling page's bounding rect begins intersecting the parent's
clip region, causing it to become visible and rendered. The page
parameter is the GuiObject that entered view. This event fires on
the frame the page's visibility flips from hidden to shown, whether due to
an animated transition, a programmatic jump, or user input scrolling.
| Thread safety | Unsafe |
|---|
PageLeave
| Parameters (1) | |
|---|---|
| page | Instance |
Fires when a sibling page's bounding rect stops intersecting the parent's
clip region, causing it to become hidden and no longer rendered. The
page parameter is the GuiObject that left view. This event fires
on the frame the page's visibility flips from shown to hidden, whether due
to an animated transition, a programmatic jump, or user input scrolling.
| Thread safety | Unsafe |
|---|
Previous
| Parameters (0) | ||
|---|---|---|
| No parameters. | ||
| Returns (1) | ||
| null | ||
Moves UIPageLayout.CurrentPage to the previous page in layout order and animates the transition (or jumps instantly if UIPageLayout.Animated is false). If the current page is already the first page and UIPageLayout.Circular is false, this method does nothing. If UIPageLayout.Circular is true, it wraps from the first page to the last.
| Thread safety | Unsafe |
|---|
ScrollWheelInputEnabled
| Type | Default | |
|---|---|---|
| bool | true | |
When set to true, mouse scroll wheel input navigates between pages.
Scrolling up moves to the previous page and scrolling down moves to the
next page. Set this to false when the scroll wheel is intended for other
interactions in the UI. Defaults to true.
| Thread safety | ReadSafe |
|---|---|
| Category | Input |
| Loaded/Saved | true |
History 6
- 731 Change Default of ScrollWheelInputEnabled from to true
- 726 Change Default of ScrollWheelInputEnabled from true to
- 553 Change Default of ScrollWheelInputEnabled from to true
- 486 Change ThreadSafety of ScrollWheelInputEnabled from ReadOnly to ReadSafe
- 462 Change ThreadSafety of ScrollWheelInputEnabled from to ReadOnly
- 310 Add ScrollWheelInputEnabled
Stopped
| Parameters (1) | |
|---|---|
| currentPage | Instance |
Fires when a page-navigation animation reaches its target without being
interrupted by new input, and the view comes to rest. The currentPage
parameter is the GuiObject now displayed. This event does not fire
for programmatic transitions made while UIPageLayout.Animated is
false, since those snap to the target page instantly.
| Thread safety | Unsafe |
|---|
TouchInputEnabled
| Type | Default | |
|---|---|---|
| bool | true | |
When set to true, touch-based swipe gestures navigate between pages. Set
this to false for layouts where touch input should not trigger page
transitions, such as non-interactive displays. Defaults to true.
| Thread safety | ReadSafe |
|---|---|
| Category | Input |
| Loaded/Saved | true |
History 6
- 731 Change Default of TouchInputEnabled from to true
- 726 Change Default of TouchInputEnabled from true to
- 553 Change Default of TouchInputEnabled from to true
- 486 Change ThreadSafety of TouchInputEnabled from ReadOnly to ReadSafe
- 462 Change ThreadSafety of TouchInputEnabled from to ReadOnly
- 310 Add TouchInputEnabled
TweenTime
| Type | Default | |
|---|---|---|
| float | 1 | |
The duration, in seconds, of the animated transition when navigating
between pages. The value is clamped to a minimum of 0.01. Only takes
effect when UIPageLayout.Animated is true. Defaults to 1.
| Thread safety | ReadSafe |
|---|---|
| Category | Appearance |
| Loaded/Saved | true |