IN THIS ARTICLE
UiDropdownComponent
UiDropdownComponent
You can use UiDropdownComponent
to implement a UI dropdown menu in Amazon Lumberyard.
UiDropdownBus
Services messages for the UiDropdownComponent
.
GetValue
Returns the value of the dropdown. The value is the last option that was selected.
Syntax
AZ::EntityId GetValue()
SetValue
Sets the value of the dropdown manually.
Syntax
void SetValue(AZ::EntityId value)
GetContent
Returns the content element that this dropdown expands.
Syntax
AZ::EntityId GetContent()
SetContent
Sets the content element that this dropdown expands.
Syntax
void SetContent(AZ::EntityId content)
GetExpandOnHover
Returns whether this dropdown should expand automatically on hover.
Syntax
bool GetExpandOnHover()
SetExpandOnHover
Sets whether this dropdown expands automatically on hover.
Syntax
void SetExpandOnHover(bool expandOnHover)
GetWaitTime
Returns how long to wait before expanding upon hover and collapsing upon exit.
Syntax
float GetWaitTime()
SetWaitTime
Sets how long to wait before expanding upon hover and collapsing upon exit.
Syntax
void SetWaitTime(float waitTime)
GetCollapseOnOutsideClick
Returns whether this dropdown collapses when the user clicks outside.
Syntax
bool GetCollapseOnOutsideClick()
SetCollapseOnOutsideClick
Sets whether this dropdown collapses when the user clicks outside.
Syntax
void SetCollapseOnOutsideClick(bool collapseOnOutsideClick)
GetExpandedParentId
Returns the element that the dropdown content parents to when expanded (the root element by default).
Syntax
AZ::EntityId GetExpandedParentId()
SetExpandedParentId
Sets the element that the dropdown content parents to when expanded.
Syntax
void SetExpandedParentId(AZ::EntityId expandedParentId)
GetTextElement
Returns the text element that displays the text of the currently selected option.
Syntax
bool GetCollapseOnOutsideClick()
SetTextElement
Sets the text element that displays the text of the currently selected option.
Syntax
void SetTextElement(AZ::EntityId textElement)
GetIconElement
Returns the icon element that displays the icon of the currently selected option.
Syntax
AZ::EntityId GetIconElement()
SetIconElement
Sets the icon element that displays the icon of the currently selected option.
Syntax
void SetIconElement(AZ::EntityId iconElement)
Expand
Expands the dropdown menu.
Syntax
void Expand()
Collapse
Collapses the dropdown menu.
Syntax
void Collapse()
GetExpandedActionName
Returns the name of the action that is sent when the dropdown is expanded.
Syntax
const LyShine::ActionName& GetExpandedActionName()
SetExpandedActionName
Sets the name of the action that is sent when the dropdown is expanded.
Syntax
void SetExpandedActionName(const LyShine::ActionName& actionName)
GetCollapsedActionName
Returns the name of the action that is sent when the dropdown is collapsed.
Syntax
const LyShine::ActionName& GetCollapsedActionName()
SetCollapsedActionName
Sets the name of the action that is sent when the dropdown is collapsed.
Syntax
void SetCollapsedActionName(const LyShine::ActionName& actionName)
GetOptionSelectedActionName
Returns the name of the action that is sent when the dropdown value is changed.
Syntax
const LyShine::ActionName& GetOptionSelectedActionName()
SetOptionSelectedActionName
Sets the name of the action that is sent when the dropdown value is changed.
Syntax
void SetOptionSelectedActionName(const LyShine::ActionName& actionName)
UiDropdownNotificationBus
Services notifications for the UiDropdownComponent
.
OnDropdownExpanded
Notifies that the dropdown was expanded.
Syntax
void OnDropdownExpanded()
OnDropdownCollapsed
Notifies that the dropdown was collapsed.
Syntax
void OnDropdownCollapsed()
OnDropdownValueChanged
Notifies that an option was selected.
Syntax
void OnDropdownValueChanged(AZ::EntityId option)