Class ButtonSpaceComponent
Defined in File ButtonSpaceComponent.h
Inheritance Relationships
Base Types
public csp::multiplayer::ComponentBase
(Class ComponentBase)public csp::multiplayer::IEnableableComponent
(Class IEnableableComponent)public csp::multiplayer::ITransformComponent
(Class ITransformComponent)public csp::multiplayer::IVisibleComponent
(Class IVisibleComponent)
Class Documentation
-
class ButtonSpaceComponent : public csp::multiplayer::ComponentBase, public csp::multiplayer::IEnableableComponent, public csp::multiplayer::ITransformComponent, public csp::multiplayer::IVisibleComponent
Add a clickable button to your space.
Button click events can be responded to via scripts.
Public Functions
-
ButtonSpaceComponent(SpaceEntity *Parent)
Constructs the button space component, and associates it with the specified Parent space entity.
- Parameters
Parent – The Space entity that owns this component.
-
const csp::common::String &GetLabelText() const
Gets the text of the label of this button.
- Returns
The text on the label of this button.
-
void SetLabelText(const csp::common::String &Value)
Sets the text of the label of this button.
- Parameters
Value – The text on the label of this button.
-
const csp::common::String &GetIconAssetId() const
Gets the ID of the icon asset associated with the button of this component.
Note
This is used to show a specific icon on the button by ID.
- Returns
The ID of the icon asset associated with the button of this component.
-
void SetIconAssetId(const csp::common::String &Value)
Sets the ID of the icon asset associated with the button of this component.
Note
This is used to show a specific icon on the button by ID.
- Parameters
Value – The ID of the icon asset associated with the button of this component.
-
const csp::common::String &GetAssetCollectionId() const
Gets the ID of the asset collection associated with this component.
Note
To retrieve this component’s button asset, both the Asset ID and the Asset Collection ID are required.
- Returns
The ID of the asset collection associated with this component.
-
void SetAssetCollectionId(const csp::common::String &Value)
Sets the ID of the asset collection associated with this component.
Note
To retrieve this component’s button asset, both the Asset ID and the Asset Collection ID are required.
- Parameters
Value – The ID of the asset collection associated with this component.
-
ButtonSpaceComponent(SpaceEntity *Parent)