// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "CommonActivatableWidget.h" #include "GameSettingPressAnyKey.generated.h" #define UE_API GAMESETTINGS_API struct FKey; class UObject; /** * */ UCLASS(MinimalAPI, Abstract) class UGameSettingPressAnyKey : public UCommonActivatableWidget { GENERATED_BODY() public: UE_API UGameSettingPressAnyKey(const FObjectInitializer& Initializer); DECLARE_EVENT_OneParam(UGameSettingPressAnyKey, FOnKeySelected, FKey); FOnKeySelected OnKeySelected; DECLARE_EVENT(UGameSettingPressAnyKey, FOnKeySelectionCanceled); FOnKeySelectionCanceled OnKeySelectionCanceled; protected: UE_API virtual void NativeOnActivated() override; UE_API virtual void NativeOnDeactivated() override; UE_API void HandleKeySelected(FKey InKey); UE_API void HandleKeySelectionCanceled(); UE_API void Dismiss(TFunction PostDismissCallback); private: bool bKeySelected = false; TSharedPtr InputProcessor; }; #undef UE_API