Open 3D Engine LyShine Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
UiInteractableStatesInterface Class Referenceabstract

Inherits AZ::ComponentBus.

Public Types

enum  {
  StateNormal = 0 , StateHover , StatePressed , StateDisabled ,
  NumStates
}
 
using State = int
 

Public Member Functions

virtual void SetStateColor (State state, AZ::EntityId target, const AZ::Color &color)=0
 
virtual AZ::Color GetStateColor (State state, AZ::EntityId target)=0
 
virtual bool HasStateColor (State state, AZ::EntityId target)=0
 
virtual void SetStateAlpha (State state, AZ::EntityId target, float alpha)=0
 
virtual float GetStateAlpha (State state, AZ::EntityId target)=0
 
virtual bool HasStateAlpha (State state, AZ::EntityId target)=0
 
virtual void SetStateSprite (State state, AZ::EntityId target, ISprite *sprite)=0
 
virtual ISpriteGetStateSprite (State state, AZ::EntityId target)=0
 
virtual void SetStateSpritePathname (State state, AZ::EntityId target, const AZStd::string &spritePath)=0
 
virtual AZStd::string GetStateSpritePathname (State state, AZ::EntityId target)=0
 
virtual bool HasStateSprite (State state, AZ::EntityId target)=0
 
virtual void SetStateFont (State state, AZ::EntityId target, const AZStd::string &fontPathname, unsigned int fontEffectIndex)=0
 
virtual AZStd::string GetStateFontPathname (State state, AZ::EntityId target)=0
 
virtual unsigned int GetStateFontEffectIndex (State state, AZ::EntityId target)=0
 
virtual bool HasStateFont (State state, AZ::EntityId target)=0
 

Static Public Attributes

static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single
 Only one component on a entity can implement the events.
 

Member Typedef Documentation

◆ State

The different visual states that an interactable can be in. An enum class is avoided so that derived components of UiInteractableComponent can extend with additional states.

Member Function Documentation

◆ GetStateAlpha()

virtual float UiInteractableStatesInterface::GetStateAlpha ( State  state,
AZ::EntityId  target 
)
pure virtual

Get the alpha to be used for the given target when the interactable is in the given state

Returns
the alpha to be used for the given target when the interactable is in the given state

◆ GetStateColor()

virtual AZ::Color UiInteractableStatesInterface::GetStateColor ( State  state,
AZ::EntityId  target 
)
pure virtual

Get the color to be used for the given target when the interactable is in the given state

Returns
the color to be used for the given target when the interactable is in the given state

◆ GetStateFontEffectIndex()

virtual unsigned int UiInteractableStatesInterface::GetStateFontEffectIndex ( State  state,
AZ::EntityId  target 
)
pure virtual

Get the font effect to be used for the given target when the interactable is in the given state

Returns
the font effect to be used for the given target when the interactable is in the given state

◆ GetStateFontPathname()

virtual AZStd::string UiInteractableStatesInterface::GetStateFontPathname ( State  state,
AZ::EntityId  target 
)
pure virtual

Get the font path to be used for the given target when the interactable is in the given state

Returns
the font path to be used for the given target when the interactable is in the given state

◆ GetStateSprite()

virtual ISprite * UiInteractableStatesInterface::GetStateSprite ( State  state,
AZ::EntityId  target 
)
pure virtual

Get the sprite to be used for the given target when the interactable is in the given state

Returns
the sprite to be used for the given target when the interactable is in the given state

◆ GetStateSpritePathname()

virtual AZStd::string UiInteractableStatesInterface::GetStateSpritePathname ( State  state,
AZ::EntityId  target 
)
pure virtual

Get the sprite path to be used for the given target when the interactable is in the given state

Returns
the sprite path to be used for the given target when the interactable is in the given state

◆ HasStateAlpha()

virtual bool UiInteractableStatesInterface::HasStateAlpha ( State  state,
AZ::EntityId  target 
)
pure virtual

Get whether the interactable has an alpha action for this state/target combination

Returns
true if the interactable has an alpha action for this state/target combination

◆ HasStateColor()

virtual bool UiInteractableStatesInterface::HasStateColor ( State  state,
AZ::EntityId  target 
)
pure virtual

Get whether the interactable has a color action for this state/target combination

Returns
true if the interactable has a color action for this state/target combination

◆ HasStateFont()

virtual bool UiInteractableStatesInterface::HasStateFont ( State  state,
AZ::EntityId  target 
)
pure virtual

Get whether the interactable has a font action for this state/target combination

Returns
true if the interactable has a font action for this state/target combination

◆ HasStateSprite()

virtual bool UiInteractableStatesInterface::HasStateSprite ( State  state,
AZ::EntityId  target 
)
pure virtual

Get whether the interactable has a sprite action for this state/target combination

Returns
true if the interactable has a sprite action for this state/target combination

◆ SetStateAlpha()

virtual void UiInteractableStatesInterface::SetStateAlpha ( State  state,
AZ::EntityId  target,
float  alpha 
)
pure virtual

Set the alpha to be used for the given target when the interactable is in the given state If the interactable already has an alpha action for this state/target combination then replaces it

◆ SetStateColor()

virtual void UiInteractableStatesInterface::SetStateColor ( State  state,
AZ::EntityId  target,
const AZ::Color &  color 
)
pure virtual

Set the color to be used for the given target when the interactable is in the given state If the interactable already has a color action for this state/target combination then replaces it

◆ SetStateFont()

virtual void UiInteractableStatesInterface::SetStateFont ( State  state,
AZ::EntityId  target,
const AZStd::string &  fontPathname,
unsigned int  fontEffectIndex 
)
pure virtual

Set the font to be used for the given target when the interactable is in the given state If the interactable already has a font action for this state/target combination then replaces it

◆ SetStateSprite()

virtual void UiInteractableStatesInterface::SetStateSprite ( State  state,
AZ::EntityId  target,
ISprite sprite 
)
pure virtual

Set the sprite to be used for the given target when the interactable is in the given state If the interactable already has a sprite action for this state/target combination then replaces it

◆ SetStateSpritePathname()

virtual void UiInteractableStatesInterface::SetStateSpritePathname ( State  state,
AZ::EntityId  target,
const AZStd::string &  spritePath 
)
pure virtual

Set the sprite path to be used for the given target when the interactable is in the given state If the interactable already has a sprite action for this state/target combination then replaces it


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