Class UUxtUIElementComponent
Controls visibility of a UI element in the scene.
Parent-child relationships are managed via actor attachments. If the parent is hidden, all of its children will be hidden. It is recommended to have the UxtUIElementComponent as the root component as the actor as this allows it to automatically update if the actor is attached to a new parent actor. If it is not the root component, RefreshUIElement() will need to be called manually after attaching a new parent actor.
Note: Manually changing actor visibility will not affect child UI elements and may lead to unwanted behavior.
Inheritance
Namespace:
Assembly: .dll
Syntax
public: class UUxtUIElementComponent
Constructors
| Improve this Doc View SourceUUxtUIElementComponent()
Declaration
public: UUxtUIElementComponent()=default
Fields
| Improve this Doc View SourceOnHideElement
Event raised when the element is hidden.
Declaration
public: FUxtUIElementHideDelegate OnHideElement
Field Value
Type | Description |
---|---|
FUxtUIElementHideDelegate |
OnShowElement
Event raised when the element is shown.
Declaration
public: FUxtUIElementShowDelegate OnShowElement
Field Value
Type | Description |
---|---|
FUxtUIElementShowDelegate |
Methods
| Improve this Doc View SourceBeginPlay()
Declaration
protected: virtual void BeginPlay() override
GetUIVisibilityInHierarchy()
Get the element's visibility in the scene.
Declaration
public: EUxtUIElementVisibility GetUIVisibilityInHierarchy() const
Returns
Type | Description |
---|---|
EUxtUIElementVisibility |
GetUIVisibilitySelf()
Get the element's visibility. This does not reflect if the element is visible in the scene.
Declaration
public: EUxtUIElementVisibility GetUIVisibilitySelf() const
Returns
Type | Description |
---|---|
EUxtUIElementVisibility |
OnAttachmentChanged()
Declaration
protected: virtual void OnAttachmentChanged() override
RefreshUIElement()
Refresh the element's visibility. This is only necessary after changing the element's parent actor when this is not the root component of the actor.
Declaration
public: void RefreshUIElement()
SetUIVisibility(EUxtUIElementVisibility NewVisibility)
Set the element's visibility. The element will not be visible in the scene if it's parent is hidden.
Declaration
public: void SetUIVisibility(EUxtUIElementVisibility NewVisibility)
Parameters
Type | Name | Description |
---|---|---|
EUxtUIElementVisibility | NewVisibility |