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.
UiScrollBoxComponent Class Reference

Inherits UiInteractableComponent, UiScrollBoxBus::Handler, UiScrollableBus::Handler, UiInitializationBus::Handler, UiScrollerToScrollableNotificationBus::MultiHandler, UiTransformChangeNotificationBus::MultiHandler, and AZ::TickBus::Handler.

Public Member Functions

 AZ_COMPONENT (UiScrollBoxComponent, LyShine::UiScrollBoxComponentUuid, AZ::Component)
 
AZ::Vector2 GetScrollOffset () override
 
void SetScrollOffset (AZ::Vector2 scrollOffset) override
 
AZ::Vector2 GetNormalizedScrollValue () override
 
void ChangeContentSizeAndScrollOffset (AZ::Vector2 contentSize, AZ::Vector2 scrollOffset) override
 
bool HasHorizontalContentToScroll () override
 
bool HasVerticalContentToScroll () override
 
virtual bool GetIsHorizontalScrollingEnabled () override
 
virtual void SetIsHorizontalScrollingEnabled (bool isEnabled) override
 
virtual bool GetIsVerticalScrollingEnabled () override
 
virtual void SetIsVerticalScrollingEnabled (bool isEnabled) override
 
virtual bool GetIsScrollingConstrained () override
 
virtual void SetIsScrollingConstrained (bool isConstrained) override
 
virtual SnapMode GetSnapMode () override
 
virtual void SetSnapMode (SnapMode snapMode) override
 
virtual AZ::Vector2 GetSnapGrid () override
 
virtual void SetSnapGrid (AZ::Vector2 snapGrid) override
 
virtual ScrollBarVisibility GetHorizontalScrollBarVisibility () override
 
virtual void SetHorizontalScrollBarVisibility (ScrollBarVisibility visibility) override
 
virtual ScrollBarVisibility GetVerticalScrollBarVisibility () override
 
virtual void SetVerticalScrollBarVisibility (ScrollBarVisibility visibility) override
 
virtual AZ::Vector2 GetScrollSensitivity () override
 
virtual void SetScrollSensitivity (AZ::Vector2 scrollSensitivity) override
 
virtual float GetMomentumDuration () override
 
virtual void SetMomentumDuration (float scrollMomentumDuration) override
 
virtual void SetMomentumActive (bool active) override
 
virtual void StopMomentum () override
 
ScrollOffsetChangeCallback GetScrollOffsetChangingCallback () override
 
void SetScrollOffsetChangingCallback (ScrollOffsetChangeCallback onChange) override
 
const LyShine::ActionNameGetScrollOffsetChangingActionName () override
 
void SetScrollOffsetChangingActionName (const LyShine::ActionName &actionName) override
 
ScrollOffsetChangeCallback GetScrollOffsetChangedCallback () override
 
void SetScrollOffsetChangedCallback (ScrollOffsetChangeCallback onChange) override
 
const LyShine::ActionNameGetScrollOffsetChangedActionName () override
 
void SetScrollOffsetChangedActionName (const LyShine::ActionName &actionName) override
 
void SetContentEntity (AZ::EntityId entityId) override
 
AZ::EntityId GetContentEntity () override
 
void SetHorizontalScrollBarEntity (AZ::EntityId entityId) override
 
AZ::EntityId GetHorizontalScrollBarEntity () override
 
void SetVerticalScrollBarEntity (AZ::EntityId entityId) override
 
AZ::EntityId GetVerticalScrollBarEntity () override
 
AZ::EntityId FindClosestContentChildElement () override
 
AZ::EntityId FindNextContentChildElement (UiNavigationHelpers::Command command)
 
bool GetScrollableParentToContentRatio (AZ::Vector2 &ratioOut) override
 
void OnValueChangingByScroller (float value) override
 
void OnValueChangedByScroller (float value) override
 
void InGamePostActivate () override
 
bool HandlePressed (AZ::Vector2 point, bool &shouldStayActive) override
 
bool HandleReleased (AZ::Vector2 point) override
 
bool HandleEnterPressed (bool &shouldStayActive) override
 
bool HandleAutoActivation () override
 
bool HandleKeyInputBegan (const AzFramework::InputChannel::Snapshot &inputSnapshot, AzFramework::ModifierKeyMask activeModifierKeys) override
 
void InputPositionUpdate (AZ::Vector2 point) override
 
bool DoesSupportDragHandOff (AZ::Vector2 startPoint) override
 
bool OfferDragHandOff (AZ::EntityId currentActiveInteractable, AZ::Vector2 startPoint, AZ::Vector2 currentPoint, float dragThreshold) override
 
void LostActiveStatus () override
 
void HandleDescendantReceivedHoverByNavigation (AZ::EntityId descendantEntityId) override
 
void OnCanvasSpaceRectChanged (AZ::EntityId entityId, const UiTransformInterface::Rect &oldRect, const UiTransformInterface::Rect &newRect) override
 
void OnTick (float deltaTime, AZ::ScriptTimePoint time) override
 
- Public Member Functions inherited from UiInteractableComponent
 AZ_RTTI (UiInteractableComponent, "{A42EB486-1C89-434C-AD22-A3FC6CEEC46F}", AZ::Component)
 
bool CanHandleEvent (AZ::Vector2 point) override
 
bool HandlePressed (AZ::Vector2 point, bool &shouldStayActive) override
 
bool HandleReleased (AZ::Vector2 point) override
 
bool HandleMultiTouchPressed (AZ::Vector2 point, int multiTouchIndex) override
 
bool HandleMultiTouchReleased (AZ::Vector2 point, int multiTouchIndex) override
 
bool HandleEnterPressed (bool &shouldStayActive) override
 
bool HandleEnterReleased () override
 
void InputPositionUpdate (AZ::Vector2 point) override
 
void MultiTouchPositionUpdate (AZ::Vector2 point, int multiTouchIndex) override
 
void LostActiveStatus () override
 
void HandleHoverStart () override
 
void HandleHoverEnd () override
 
void HandleReceivedHoverByNavigatingFromDescendant (AZ::EntityId descendantEntityId) override
 
bool IsPressed () override
 
bool IsHandlingEvents () override
 
void SetIsHandlingEvents (bool isHandlingEvents) override
 
bool IsHandlingMultiTouchEvents () override
 
void SetIsHandlingMultiTouchEvents (bool isHandlingMultiTouchEvents) override
 
bool GetIsAutoActivationEnabled () override
 
void SetIsAutoActivationEnabled (bool isEnabled) override
 
void Update (float deltaTime) override
 
void OnUiElementFixup (AZ::EntityId canvasEntityId, AZ::EntityId parentEntityId) override
 
void OnUiElementAndAncestorsEnabledChanged (bool areElementAndAncestorsEnabled) override
 
const LyShine::ActionNameGetHoverStartActionName () override
 
void SetHoverStartActionName (const LyShine::ActionName &actionName) override
 
const LyShine::ActionNameGetHoverEndActionName () override
 
void SetHoverEndActionName (const LyShine::ActionName &actionName) override
 
const LyShine::ActionNameGetPressedActionName () override
 
void SetPressedActionName (const LyShine::ActionName &actionName) override
 
const LyShine::ActionNameGetReleasedActionName () override
 
void SetReleasedActionName (const LyShine::ActionName &actionName) override
 
const LyShine::ActionNameGetOutsideReleasedActionName () const override
 
void SetOutsideReleasedActionName (const LyShine::ActionName &actionName) override
 
OnActionCallback GetHoverStartActionCallback () override
 
void SetHoverStartActionCallback (OnActionCallback onActionCallback) override
 
OnActionCallback GetHoverEndActionCallback () override
 
void SetHoverEndActionCallback (OnActionCallback onActionCallback) override
 
OnActionCallback GetPressedActionCallback () override
 
void SetPressedActionCallback (OnActionCallback onActionCallback) override
 
OnActionCallback GetReleasedActionCallback () override
 
void SetReleasedActionCallback (OnActionCallback onActionCallback) override
 

Protected Member Functions

void Activate () override
 
void Deactivate () override
 
bool IsAutoActivationSupported () override
 
UiInteractableStatesInterface::State ComputeInteractableState () override
 Compute the current Interactable state based on internal state flags.
 
- Protected Member Functions inherited from UiInteractableComponent
void Init () override
 
void Activate () override
 
void Deactivate () override
 
void OnHoverStateActionsChanged ()
 
void OnPressedStateActionsChanged ()
 
void OnDisabledStateActionsChanged ()
 
void TriggerHoverStartAction ()
 
void TriggerHoverEndAction ()
 
void TriggerPressedAction ()
 
void TriggerReleasedAction (bool releasedOutside=false)
 
void TriggerReceivedHoverByNavigatingFromDescendantAction (AZ::EntityId descendantEntityId)
 

Static Protected Member Functions

static void GetProvidedServices (AZ::ComponentDescriptor::DependencyArrayType &provided)
 
static void GetIncompatibleServices (AZ::ComponentDescriptor::DependencyArrayType &incompatible)
 
static void GetRequiredServices (AZ::ComponentDescriptor::DependencyArrayType &required)
 
static void Reflect (AZ::ReflectContext *context)
 

Additional Inherited Members

- Static Public Member Functions inherited from UiInteractableComponent
static void Reflect (AZ::ReflectContext *context)
 
- Protected Types inherited from UiInteractableComponent
using StateActions = AZStd::vector< UiInteractableStateAction * >
 
- Protected Attributes inherited from UiInteractableComponent
StateActions m_hoverStateActions
 Selected/Hover state properties.
 
StateActions m_pressedStateActions
 Pressed state properties.
 
StateActions m_disabledStateActions
 Disabled state properties.
 
LyShine::ActionName m_hoverStartActionName
 Action triggered on hover start.
 
LyShine::ActionName m_hoverEndActionName
 Action triggered on hover end.
 
LyShine::ActionName m_pressedActionName
 Action triggered on pressed.
 
LyShine::ActionName m_releasedActionName
 Action triggered on release.
 
LyShine::ActionName m_outsideReleasedActionName
 Action triggered on release outside.
 
bool m_isAutoActivationEnabled
 
bool m_isHandlingEvents
 True if this interactable is accepting input (i.e. not in disabled state)
 
bool m_isHandlingMultiTouchEvents
 True if this interactable is handling multi-touch input events.
 
bool m_isHover
 True if this interactable is being hovered (can be true at the same time as m_isPressed)
 
bool m_isPressed
 True if the interactable is in the pressed state (which can be true while dragging)
 
AZ::Vector2 m_pressedPoint
 the viewport position at which the press event occured (only valid if m_isPressed is true)
 
int m_pressedMultiTouchIndex
 the multitouch position at which the press event occured (only valid if m_isPressed is true)
 
UiInteractableStatesInterface::State m_state
 The current interactable state. This is stored so that we can detect state changes.
 
OnActionCallback m_hoverStartActionCallback
 Callback triggered on hover start.
 
OnActionCallback m_hoverEndActionCallback
 Callback triggered on hover end.
 
OnActionCallback m_pressedActionCallback
 Callback triggered on pressed.
 
OnActionCallback m_releasedActionCallback
 Callback triggered on release.
 
UiStateActionManager m_stateActionManager
 
UiNavigationSettings m_navigationSettings
 

The documentation for this class was generated from the following file: