5#include "CoreMinimal.h"
7#include "AdvancedUserWidget.generated.h"
31 GENERATED_UCLASS_BODY()
37 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Input")
38 bool bAutoRegister = false;
40 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Input")
41 bool bCloseOtherWidgets = true;
43 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Input")
44 bool bPreventWidgetsFromOpening = false;
46 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Input")
47 bool bPreventLowerPriorityWidgetsFromOpening = false;
49 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Input")
50 bool bDisablesPlayerInputWhenActive = true;
52 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Input")
53 float CollapseDelay = 0.0f;
55 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Input")
56 bool bDismissableByBackInput = true;
58 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Input")
59 bool bDismissableByOtherWidgets = true;
61 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Input")
62 bool bDestroyOnLevelTravel = true;
63 UPROPERTY(BlueprintReadWrite, EditDefaultsOnly, Category = "Controller")
64 bool bAutoFocusWidget = true;
65 UPROPERTY(BlueprintReadOnly, EditDefaultsOnly, Category = "Controller", meta = (EditCondition = "bAutoFocusWidget"))
66 bool bRestoreLastFocusedChild = true;
67 UPROPERTY(BlueprintReadWrite, EditInstanceOnly, Category = "Controller")
68 UWidget* FocusPriorityWidget =
nullptr;
69 UPROPERTY(BlueprintReadOnly, EditDefaultsOnly, Category = "Controller")
70 bool bUsesVirtualCursor = false;
71 UPROPERTY(BlueprintReadOnly, EditDefaultsOnly, Category = "Controller")
72 bool bRestrictNavigationToWidget = true;
74 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Input")
77 float bAutoDestroy = false;
78 bool bWantsToCollapse = false;
80 FTimerHandle CollapseDelayTimerHandle;
81 uint32 FadeOutInterpolationID = INDEX_NONE;
83 UPROPERTY(BlueprintAssignable, Category = "Widget Events")
84 FWidgetVisibleSignature OnWidgetMadeVisible;
85 UPROPERTY(BlueprintAssignable, Category = "Widget Events")
86 FWidgetCollapsedSignature OnWidgetWasCollapsed;
88 UFUNCTION(BlueprintImplementableEvent, Category = "Widget Events")
89 void OnGamepadAxisMoved(const FName AxisName, const int32 ControllerId, const
float Delta);
90 UFUNCTION(BlueprintImplementableEvent, Category = "Widget Events")
91 void OnGamepadButtonPressed(const FInputEvent InputEvent, const int32 ControllerId);
92 UFUNCTION(BlueprintImplementableEvent, Category = "Widget Events")
94 UFUNCTION(BlueprintImplementableEvent, Category = "Widget Events")
96 UFUNCTION(BlueprintImplementableEvent, Category = "Widget Events")
97 void OnRightFaceButton();
98 UFUNCTION(BlueprintImplementableEvent, Category = "Widget Events")
99 void OnLeftFaceButton();
100 UFUNCTION(BlueprintImplementableEvent, Category = "Widget Events")
101 void OnTopFaceButton();
102 UFUNCTION(BlueprintImplementableEvent, Category = "Widget Events")
103 void OnBottomFaceButton();
104 UFUNCTION(BlueprintNativeEvent, Category = "Widget Events")
105 bool CanDisplayWidget() const;
106 UFUNCTION(BlueprintNativeEvent, Category = "Widget Events")
107 void OnWidgetVisible(const UObject* ContextObject =
nullptr);
108 UFUNCTION(BlueprintNativeEvent, Category = "Widget Events")
109 void OnWidgetDelayedCollapseStart(const UObject* ContextObject =
nullptr);
114 UFUNCTION(BlueprintPure, Category = "Context Menu")
115 FORCEINLINE
bool IsDismissable()
const {
return bDismissableByBackInput || bDismissableByOtherWidgets; }
117 UFUNCTION(BlueprintImplementableEvent, Category =
"Widget Events")
120 UFUNCTION(BlueprintNativeEvent, Category = "Widget Controls")
121 void CollapseWidget();
122 UFUNCTION(BlueprintNativeEvent, Category = "Widget Controls")
123 void SetWidgetVisible();
124 UFUNCTION(BlueprintNativeEvent, BlueprintPure, Category = "Widget Controls")
125 bool IsWidgetActive() const;
128 UFUNCTION(BlueprintCallable, Category = "Widget Controls")
131 UFUNCTION(BlueprintCallable, Category = "Widget Controls")
134 FORCEINLINE
float GetTimeSpawned() {
return TimeSpawned; }
139 void AlertInterfaceMenuWasToggled(
bool bToggle);
141 UWidget* GetLastFocusedWidget() {
return LastFocusedWidget.Get(); }
143 virtual void NativeConstruct()
override;
144 virtual void NativeDestruct()
override;
145 void CacheFocusedElement();
146 UWidget* GetFocusedChild(
const UUserWidget* Widget);
147 virtual void AddToScreen(
class ULocalPlayer* LocalPlayer, int32 inZOrder)
override;
148 virtual FReply NativeOnFocusReceived(
const FGeometry& InGeometry,
const FFocusEvent& InFocusEvent )
override;
151 UFUNCTION(BlueprintImplementableEvent, Category =
"Widget Events")
152 void OnLevelTravel();
154 float TimeSpawned = 0.0f;
156 void FadeWidget(
float FadeTo,
float Time);
157 TWeakObjectPtr<UWidget> LastFocusedWidget;
Definition: ProjectXGameViewportClient.h:23
static UProjectXGameViewportClient * GetViewportClient(const UObject *WorldContextObject)
Definition: ProjectXGameViewportClient.cpp:621