Open 3D Engine LyShine Gem API Reference
24.09
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
|
Inherits AZ::ComponentBus.
Public Types | |
enum class | SnapMode { None , Children , Grid } |
enum class | ScrollBarVisibility { AlwaysShow , AutoHide , AutoHideAndResizeViewport } |
typedef AZStd::function< void(AZ::EntityId sendingEntityId, AZ::Vector2 newScrollOffset)> | ScrollOffsetChangeCallback |
Callback for when box is scrolled. | |
Public Member Functions | |
virtual AZ::Vector2 | GetScrollOffset ()=0 |
virtual void | SetScrollOffset (AZ::Vector2 scrollOffset)=0 |
virtual AZ::Vector2 | GetNormalizedScrollValue ()=0 |
Get the scroll value from 0 - 1. | |
virtual void | ChangeContentSizeAndScrollOffset (AZ::Vector2 contentSize, AZ::Vector2 scrollOffset)=0 |
Change content size and scroll offset, and handle the changes. | |
virtual bool | HasHorizontalContentToScroll ()=0 |
Get whether there is content to scroll horizontally. | |
virtual bool | HasVerticalContentToScroll ()=0 |
Get whether there is content to scroll vertically. | |
virtual bool | GetIsHorizontalScrollingEnabled ()=0 |
Get whether horizontal scrolling interaction is enabled. | |
virtual void | SetIsHorizontalScrollingEnabled (bool isEnabled)=0 |
Set whether horizontal scrolling interaction is enabled. | |
virtual bool | GetIsVerticalScrollingEnabled ()=0 |
Get whether vertical scrolling interaction is enabled. | |
virtual void | SetIsVerticalScrollingEnabled (bool isEnabled)=0 |
Set whether vertical scrolling interaction is enabled. | |
virtual bool | GetIsScrollingConstrained ()=0 |
Get whether scrolling interaction is constrained to the content area. | |
virtual void | SetIsScrollingConstrained (bool isConstrained)=0 |
Set whether vertical scrolling interaction is constrained to the content area. | |
virtual SnapMode | GetSnapMode ()=0 |
Get snap mode. | |
virtual void | SetSnapMode (SnapMode snapMode)=0 |
Set snap mode. | |
virtual AZ::Vector2 | GetSnapGrid ()=0 |
Get snap grid. | |
virtual void | SetSnapGrid (AZ::Vector2 snapGrid)=0 |
Set snap grid. | |
virtual ScrollBarVisibility | GetHorizontalScrollBarVisibility ()=0 |
Get horizontal scrollbar visibility behavior. | |
virtual void | SetHorizontalScrollBarVisibility (ScrollBarVisibility visibility)=0 |
Set horizontal scrollbar visibility behavior. | |
virtual ScrollBarVisibility | GetVerticalScrollBarVisibility ()=0 |
Get vertical scrollbar visibility behavior. | |
virtual void | SetVerticalScrollBarVisibility (ScrollBarVisibility visibility)=0 |
Set vertical scrollbar visibility behavior. | |
virtual AZ::Vector2 | GetScrollSensitivity ()=0 |
Get horizontal and vertical scroll sensitivity speed. | |
virtual void | SetScrollSensitivity (AZ::Vector2 scrollSensitivity)=0 |
Set horizontal and vertical scroll sensitivity speed. | |
virtual float | GetMomentumDuration ()=0 |
Get scrolling momentum duration. | |
virtual void | SetMomentumDuration (float scrollMomentumDuration)=0 |
Set scrolling momentum duration. | |
virtual void | SetMomentumActive (bool active)=0 |
Set scrolling momentum active. | |
virtual void | StopMomentum ()=0 |
Stops the scrolling. | |
virtual ScrollOffsetChangeCallback | GetScrollOffsetChangingCallback ()=0 |
Get the callback invoked while the scroll offset is changing. | |
virtual void | SetScrollOffsetChangingCallback (ScrollOffsetChangeCallback onChange)=0 |
Set the callback invoked while the scroll offset is changing. | |
virtual const LyShine::ActionName & | GetScrollOffsetChangingActionName ()=0 |
Get the action triggered while the scroll offset is changing. | |
virtual void | SetScrollOffsetChangingActionName (const LyShine::ActionName &actionName)=0 |
Set the action triggered while the scroll offset is changing. | |
virtual ScrollOffsetChangeCallback | GetScrollOffsetChangedCallback ()=0 |
Get the callback invoked when the scroll offset is done changing. | |
virtual void | SetScrollOffsetChangedCallback (ScrollOffsetChangeCallback onChange)=0 |
Set the callback invoked when the scroll offset is done changing. | |
virtual const LyShine::ActionName & | GetScrollOffsetChangedActionName ()=0 |
Get the action triggered when the scroll offset is done changing. | |
virtual void | SetScrollOffsetChangedActionName (const LyShine::ActionName &actionName)=0 |
Set the action triggered when the scroll offset is done changing. | |
virtual void | SetContentEntity (AZ::EntityId entityId)=0 |
Set the optional content entity, if none is specified then nothing gets scrolled. | |
virtual AZ::EntityId | GetContentEntity ()=0 |
Get the optional content entity. | |
virtual void | SetHorizontalScrollBarEntity (AZ::EntityId entityId)=0 |
Set the optional horizontal scrollbar entity. | |
virtual AZ::EntityId | GetHorizontalScrollBarEntity ()=0 |
Get the optional horizontal scrollbar entity. | |
virtual void | SetVerticalScrollBarEntity (AZ::EntityId entityId)=0 |
Set the optional vertical scrollbar entity. | |
virtual AZ::EntityId | GetVerticalScrollBarEntity ()=0 |
Get the optional vertical scrollbar entity. | |
virtual AZ::EntityId | FindClosestContentChildElement ()=0 |
Static Public Attributes | |
static const AZ::EBusHandlerPolicy | HandlerPolicy = AZ::EBusHandlerPolicy::Single |
Only one component on a entity can implement the events. | |
|
pure virtual |
Find the child of the content element that is closest to the content anchors at the current scroll offset. i.e. what is the currently "selected" child
|
pure virtual |
Query the current scroll offset of the scroll box
The scroll offset is the offset from the content element's anchor point to the content element's pivot. If the content element's anchor points are split it is the offset from their center to the pivot. So if the mouse is dragged left, the content moves to the left, so the offset X has the X drag amount subtracted from it. Using the offset from the anchor to the pivot allows the offset to be center to center or top-left to top-left, or any combination of the possible anchor and pivot positions
|
pure virtual |
Set the scroll offset of the scroll box
isOn | The new desired scroll offset of the scroll box. |