Menu
Lumberyard
Developer Guide (Version 1.11)

UIElementComponent

Provides functionality for UI elements.

UiElementBus

Services messages for the UiElementComponent.

DestroyElement

Deletes this element and removes it from its parent element.

Syntax

Copy
Void DestroyElement()

FindChildByName

Returns the first immediate child with the specified name. Returns AZ::InvalidEntityId if no match is found.

Syntax

Copy
AZ::EntityId FindChildByName(const AZStd::string & name)

FindDescendantByName

Returns the first descendant entity with the specified name. Returns AZ::InvalidEntityId if no match is found.

Syntax

Copy
AZ::EntityId FindDescendantByName(const AZStd::string & name)

GetCanvas

Returns the canvas that contains this element. Returns AZ::InvalidEntityId if the element has no canvas.

Syntax

Copy
AZ::EntityId GetCanvas()

GetChild

Returns the child at the specified index. Index must be less than GetNumChildElements().

Syntax

Copy
AZ::EntityId GetChild(int index)

GetChildren

Returns the child elements of this element.

Syntax

Copy
AZStd::vector<AZ::EntityId> GetChildren()

GetIndexOfChildByEntityId

Returns the index of the specified child element.

Syntax

Copy
int GetIndexOfChildByEntityId(AZ::EntityId childId)

GetName

Returns the name of this element.

Syntax

Copy
AZStd::string GetName()

GetNumChildElements

Returns the number of child elements of this element.

Syntax

Copy
int GetNumChildElements()

GetParent

Returns the parent of this element. Returns an invalid entity ID if the element has no parent.

Syntax

Copy
AZ::EntityId GetParent()

IsEnabled

Returns true if the element is enabled; false otherwise.

Syntax

Copy
bool IsEnabled()

Reparent

Changes this element to be the child of a new parent. The element is removed from its current parent and added as a child of newParent. If newParent is invalid, the element becomes a top-level element. If insertBefore is a valid entity ID, then the element is inserted before the insertBefore element if insertBefore is a child of the new parent.

Syntax

Copy
void Reparent(AZ::EntityId newParent, AZ::EntityId insertBefore)

SetIsEnabled

Sets the enabled state of the element.

Syntax

Copy
void SetIsEnabled(bool isEnabled)

On this page: