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.
UiCheckboxInterface Class Referenceabstract

Inherits AZ::ComponentBus.

Public Types

typedef AZStd::function< void(AZ::EntityId, AZ::Vector2, bool)> StateChangeCallback
 params: sending entity id, new state
 

Public Member Functions

virtual bool GetState ()=0
 
virtual void SetState (bool checked)=0
 
virtual bool ToggleState ()=0
 
virtual StateChangeCallback GetStateChangeCallback ()=0
 Get the state change callback.
 
virtual void SetStateChangeCallback (StateChangeCallback onChange)=0
 Set the state change callback.
 
virtual void SetCheckedEntity (AZ::EntityId entityId)=0
 Set the optional checked (ON) entity.
 
virtual AZ::EntityId GetCheckedEntity ()=0
 Get the optional checked (ON) entity.
 
virtual void SetUncheckedEntity (AZ::EntityId entityId)=0
 Set the optional unchecked (OFF) entity.
 
virtual AZ::EntityId GetUncheckedEntity ()=0
 Get the optional unchecked (OFF) entity.
 
virtual const LyShine::ActionNameGetTurnOnActionName ()=0
 Get the action triggered when turned on.
 
virtual void SetTurnOnActionName (const LyShine::ActionName &actionName)=0
 Set the action triggered when turned on.
 
virtual const LyShine::ActionNameGetTurnOffActionName ()=0
 Get the action triggered when turned off.
 
virtual void SetTurnOffActionName (const LyShine::ActionName &actionName)=0
 Set the action triggered when turned off.
 
virtual const LyShine::ActionNameGetChangedActionName ()=0
 Get the action triggered when changed.
 
virtual void SetChangedActionName (const LyShine::ActionName &actionName)=0
 Set the action triggered when changed.
 

Static Public Attributes

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

Member Function Documentation

◆ GetState()

virtual bool UiCheckboxInterface::GetState ( )
pure virtual

Query the state of the checkbox

Returns
The current state for the checkbox.

◆ SetState()

virtual void UiCheckboxInterface::SetState ( bool  checked)
pure virtual

Manually override the state of the checkbox

Parameters
isOnThe new desired state of the checkbox.

◆ ToggleState()

virtual bool UiCheckboxInterface::ToggleState ( )
pure virtual

Toggle the state of the checkbox

Returns
The new state of the checkbox.

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