FairyGUI.ScrollPane
class FairyGUI.ScrollPane
Fields and Properties:
- (static)
float FairyGUI.ScrollPane.TWEEN_TIME_GO - (static)
float FairyGUI.ScrollPane.TWEEN_TIME_DEFAULT - (static)
float FairyGUI.ScrollPane.PULL_RATIO - (static)
FairyGUI.ScrollPane FairyGUI.ScrollPane.draggingPane- Description: The currently dragged scroll pane. Only one scroll pane can be dragged at a time.
FairyGUI.EventListener onScroll- Description: Dispatched when scrolling.
FairyGUI.EventListener onScrollEnd- Description: Dispatched when scrolling ends.
FairyGUI.EventListener onPullDownRelease- Description: Dispatched when the user releases a downward pull gesture after crossing the upper edge.
FairyGUI.EventListener onPullUpRelease- Description: Dispatched when the user releases an upward pull gesture after crossing the lower edge.
FairyGUI.GComponent owner- Description:
FairyGUI.GScrollBar hzScrollBar- Description:
FairyGUI.GScrollBar vtScrollBar- Description:
FairyGUI.GComponent header- Description:
FairyGUI.GComponent footer- Description:
bool bouncebackEffect- Description: Determines whether a bounce-back effect is allowed when scrolling reaches the edge.
bool touchEffect- Description: Specifies whether scrolling by dragging the content area is allowed.
bool inertiaDisabled- Description: Determines whether inertia scrolling is allowed.
bool softnessOnTopOrLeftSide- Description: Specifies whether a soft edge effect is displayed on the top or left side.
float scrollStep- Description: The distance to scroll when calling ScrollPane.scrollUp/Down/Left/Right or clicking on the up/down arrow buttons of the scrollbar.
bool snapToItem- Description: Determines whether the scroll position should remain close to the edge of a specific item.
bool pageMode- Description: Specifies whether the scroll pane is in page scroll mode.
FairyGUI.Controller pageController- Description:
bool mouseWheelEnabled- Description: Determines whether scrolling using the mouse wheel is allowed.
float decelerationRate- Description: The deceleration rate applied during inertia scrolling. The default value is UIConfig.defaultScrollDecelerationRate. A value closer to 1 means slower deceleration, resulting in a longer scroll time and distance.
bool isDragged- Description:
float percX- Description: The current X-axis scroll position as a percentage, ranging from 0 to 1 (inclusive).
float percY- Description: The current Y-axis scroll position as a percentage, ranging from 0 to 1 (inclusive).
float posX- Description: The current X-axis scroll position, with a value range equal to the difference between viewWidth and contentWidth.
float posY- Description: The current Y-axis scroll position, with a value range equal to the difference between viewHeight and contentHeight.
bool isBottomMost- Description: Returns whether the current scroll position is at the bottom edge.
bool isRightMost- Description: Returns whether the current scroll position is at the right edge.
int currentPageX- Description: If in page mode, returns the current page number on the X-axis.
int currentPageY- Description: If in page mode, returns the current page number on the Y-axis.
float scrollingPosX- Description: This value differs from PosX in that it reflects the real-time position, while PosX is only the final value during the process of easing.
float scrollingPosY- Description: This value differs from PosY in that it reflects the real-time position, while PosY is only the final value during the process of easing.
float contentWidth- Description: The width of the displayed content.
float contentHeight- Description: The height of the displayed content.
float viewWidth- Description: The width of the display area.
float viewHeight- Description: The height of the display area.
Constructors:
FairyGUI.ScrollPane.New(FairyGUI.GComponent)
Methods:
void Dispose()- Description:
void SetPercX(float, bool)- Description: Sets the current X-axis scroll position as a percentage, ranging from 0 to 1 (inclusive).
- Parameter value:
- Parameter ani: Specifies whether easing should be used to reach the target position.
void SetPercY(float, bool)- Description: Sets the current Y-axis scroll position as a percentage, ranging from 0 to 1 (inclusive).
- Parameter value:
- Parameter ani: Specifies whether easing should be used to reach the target position.
void SetPosX(float, bool)- Description: Sets the current X-axis scroll position.
- Parameter value:
- Parameter ani: Specifies whether easing should be used to reach the target position.
void SetPosY(float, bool)- Description: Sets the current Y-axis scroll position.
- Parameter value:
- Parameter ani: Specifies whether easing should be used to reach the target position.
void SetCurrentPageX(int, bool)- Description: If in page mode, sets the X-axis page number.
- Parameter value:
- Parameter ani: Specifies whether easing should be used to reach the target position.
void SetCurrentPageY(int, bool)- Description: If in page mode, sets the Y-axis page number.
- Parameter value:
- Parameter ani: Specifies whether easing should be used to reach the target position.
void ScrollTop()- Description:
void ScrollTop(bool)- Description:
- Parameter ani:
void ScrollBottom()- Description:
void ScrollBottom(bool)- Description:
- Parameter ani:
void ScrollUp()- Description:
void ScrollUp(float, bool)- Description:
- Parameter ratio:
- Parameter ani:
void ScrollDown()- Description:
void ScrollDown(float, bool)- Description:
- Parameter ratio:
- Parameter ani:
void ScrollLeft()- Description:
void ScrollLeft(float, bool)- Description:
- Parameter speed:
- Parameter ani:
void ScrollRight()- Description:
void ScrollRight(float, bool)- Description:
- Parameter ratio:
- Parameter ani:
void ScrollToView(FairyGUI.GObject)- Description:
- Parameter obj: obj can be any object on stage, not limited to the direct child of this container.
void ScrollToView(FairyGUI.GObject, bool)- Description:
- Parameter obj: obj can be any object on stage, not limited to the direct child of this container.
- Parameter ani: If moving to target position with animation
void ScrollToView(FairyGUI.GObject, bool, bool)- Description:
- Parameter obj: obj can be any object on stage, not limited to the direct child of this container.
- Parameter ani: If moving to target position with animation
- Parameter setFirst: If true, scroll to make the target on the top/left; If false, scroll to make the target any position in view.
void ScrollToView(UnityEngine.Rect, bool, bool)- Description:
- Parameter rect: Rect in local coordinates
- Parameter ani: If moving to target position with animation
- Parameter setFirst: If true, scroll to make the target on the top/left; If false, scroll to make the target any position in view.
bool IsChildInView(FairyGUI.GObject)- Description:
- Parameter obj: obj must be the direct child of this container
- Return:
void CancelDragging()- Description: This method can be called to stop or prevent dragging when the scroll panel is in the dragging state or is about to enter the dragging state.
void LockHeader(int)- Description: Sets the fixed display of the header. If the size is 0, the fixed display is canceled.
- Parameter size: The size of the displayed header
void LockFooter(int)- Description: Sets the fixed display of the footer. If the size is 0, the fixed display is canceled.
- Parameter size:
void UpdateScrollBarVisible()