Navigation
API > API/Plugins > API/Plugins/CommonUI
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UVisual
- UWidget
- UUserWidget
- UCommonUserWidget
- UCommonActivatableWidget
- UXRCreativePaletteTab
- UXRCreativePaletteToolTab
References
| Module | CommonUI |
| Header | /Engine/Plugins/Runtime/CommonUI/Source/CommonUI/Public/CommonActivatableWidget.h |
| Include | #include "CommonActivatableWidget.h" |
Syntax
UCLASS&40;Meta&61;&40;DisableNativeTick&41;&41;
class UCommonActivatableWidget : public UCommonUserWidget
Remarks
The base for widgets that are capable of being "activated" and "deactivated" during their lifetime without being otherwise modified or destroyed.
This is generally desired for one or more of the following purposes:
- This widget can turn on/off without being removed from the hierarchy (or otherwise reconstructing the underlying SWidgets), so Construct/Destruct are insufficient
- You'd like to be able to "go back" from this widget, whether that means back a breadcrumb, closing a modal, or something else. This is built-in here.
- This widget's place in the hierarchy is such that it defines a meaningful node-point in the tree of activatable widgets through which input is routed to all widgets.
By default, an activatable widget:
- Is not automatically activated upon construction
- Does not register to receive back actions (or any other actions, for that matter)
- If classified as a back handler, is automatically deactivated (but not destroyed) when it receives a back action
Note that removing an activatable widget from the UI (i.e. triggering Destruct()) will always deactivate it, even if the UWidget is not destroyed. Re-constructing the underlying SWidget will only result in re-activation if auto-activate is enabled.
Variables
| Type | Name | Description | |
|---|---|---|---|
| TSoftObjectPtr< UCommonInputActionDomain > | ActionDomainOverride | Enable to override the inherited ActionDomain from owning CommonActivatableWidget. | |
| ESlateVisibility | ActivatedVisibility | ||
| bool | bAutoActivate | True to automatically activate upon construction | |
| bool | bIsBackActionDisplayedInActionBar | True to receive "Back" actions automatically. | |
| bool | bIsBackHandler | True to receive "Back" actions automatically. | |
| bool | bIsModal | True to have this widget be treated as a root node for input routing, regardless of its actual parentage. | |
| bool | bOverrideActionDomain | ||
| bool | bSetVisibilityOnActivated | ||
| bool | bSetVisibilityOnDeactivated | ||
| bool | bSupportsActivationFocus | True if this widget is a candidate to receive/route focus or specify a desired UIInputConfig when active. | |
| ESlateVisibility | DeactivatedVisibility | ||
| *If | false | True to prefer automatically restoring focus to the widget that was focused when this widget last became the non-leafmost-active-widget. | |
| TObjectPtr< UInputMappingContext > | InputMapping | Optional mapping context to be applied & removed on activation & deactivation respectfully. | |
| int32 | InputMappingPriority | Enhanced Input priority. |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | |||
| bool | |||
| void | BindVisibilityToActivation
(
UCommonActivatableWidget* ActivatableWidget |
Bind our visibility to the activation of another widget, useful for making mouse collisions behave similiar to console navigation w.r.t activation Will immediately update visibility based on the bound widget activation & visibilites set by SetBindVisibilities. | |
| UWidget * | Implement to provide the desired widget to focus if/when this activatable becomes the primary active widget. | ||
| FUIInputConfig | Implement to provide the input config to use when this widget is activated. | ||
| void | |||
| void | |||
| bool | Override in BP implementations to provide custom behavior when receiving a back action Note: Only called if native code in the base class hasn't handled it in NativeOnHandleBackAction | ||
| void | |||
| void | |||
| TOptional< FActivationMetadata > | Gets custom game-specific activation metadata for this widget. | ||
| TObjectPtr< UCommonInputActionDomain > | Returns the widget's ActionDomain, respecting any inheritance requirements. | ||
| UWidget * | Returns the desired widget to focus when this Widget Activates. | ||
| *If we simply always rely on | |||
| TOptional< FUIInputConfig > | Gets the desired input configuration to establish when this widget activates and can receive input (i.e. all parents are also active). | ||
| void | |||
| void | |||
| void | |||
| bool | IsActivated () |
||
| bool | IsModal () |
||
| UWidget * | Override to provide the desired widget that should receive focus when this becomes the primary active widget. | ||
| void | |||
| void | |||
| bool | |||
| FSimpleMulticastDelegate & | OnActivated () |
||
| FSimpleMulticastDelegate & | |||
| FSimpleMulticastDelegate & | |||
| FSimpleMulticastDelegate & | |||
| void | RegisterInputTreeNode
(
const TSharedPtr< FActivatableTreeNode >& OwnerNode |
||
| void | Ask for focus to be re-set to our current DesiredFocusTarget, but only if our node is currently the leaf-most active node (no stealing!). | ||
| void | Reset () |
||
| void | SetBindVisibilities
(
ESlateVisibility OnActivatedVisibility, |
Visibilities to use for when bound widgets in BindVisibilityToActivation are activated. | |
| bool | |||
| bool | |||
| bool |
Overridden from UUserWidget
| Type | Name | Description | |
|---|---|---|---|
| void | |||
| void |
Overridden from UWidget
| Type | Name | Description | |
|---|---|---|---|
| TSharedRef< SWidget > | Function implemented by all subclasses of UWidget is called when the underlying SWidget needs to be constructed. |
Overridden from UVisual
| Type | Name | Description | |
|---|---|---|---|
| void | ReleaseSlateResources
(
bool bReleaseChildren |
Typedefs
| Name | Description |
|---|---|
| FActivatableWidgetRebuildEvent |
Constants
| Name | Description |
|---|---|
| OnRebuilding |