ULimenWidget
Overview
ULimenWidget is an abstract base class that extends UUserWidget. It provides methods to show, hide, and toggle widget visibility, as well as support for animations. This class is designed to be extended by other custom widgets in the Limen Framework.
Properties
Type | Name | Access | Description | |
|---|---|---|---|---|
TObjectPtr | ShowAnimation | EditAnywhere, BlueprintReadOnly | The animation played when showing the widget. | |
TObjectPtr | HideAnimation | EditAnywhere, BlueprintReadOnly | The animation played when hiding the widget. | |
ESlateVisibility | DefaultVisibleState | EditAnywhere, Category=" Limen | Animations" | The default visibility state when the widget is visible. |
ESlateVisibility | DefaultHiddenState | EditAnywhere, Category=" Limen | Animations" | The default visibility state when the widget is hidden. |
Functions
Return Type | Signature | Description |
|---|---|---|
bool | ShowWidget() | Shows the widget if it is not already visible and not currently animating. |
bool | HideWidget() | Hides the widget if it is currently showing and not currently animating. |
void | HideWidgetWithCallback(FLimenBlueprintWidgetHidden OnWidgetHidden) | Hides the widget with a callback when the hide animation finishes. |
void | DestroyWidget(const bool bWaitForHideAnimation = true) | Destroys the widget, optionally waiting for any hide animations to finish. |
void | SetWidgetLevel(const int32 NewLevel) | Sets the ZOrder of the widget. |
uint8 | GetWidgetLevel() const | Gets the current ZOrder of the widget. |
void | SetDefaultVisibleState(const ESlateVisibility NewDefaultVisibleState) | Sets the default visible state of the widget. |
void | SetDefaultHiddenState(const ESlateVisibility NewDefaultHiddenState) | Sets the default hidden state of the widget. |
ESlateVisibility | GetDefaultVisibleState() const | Gets the current default visible state of the widget. |
ESlateVisibility | GetDefaultHiddenState() const | Gets the current default hidden state of the widget. |
Usage & Implementation Notes
The
ShowWidgetandHideWidgetmethods handle visibility changes, playing animations if available.The
DestroyWidgetmethod can be used to safely remove a widget from the viewport.The
SetWidgetLevelmethod allows setting the ZOrder of the widget, which determines its layering in the viewport.