Inherits AZ::ComponentBus.
|
enum | {
StateNormal = 0
, StateHover
, StatePressed
, StateDisabled
,
NumStates
} |
|
using | State = int |
|
|
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 ISprite * | GetStateSprite (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 const AZ::EBusHandlerPolicy | HandlerPolicy = AZ::EBusHandlerPolicy::Single |
| Only one component on a entity can implement the events.
|
|
◆ 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.
◆ 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:
- Gems/LyShine/Code/Include/LyShine/Bus/UiInteractableStatesBus.h