Files
TG_ARPG/Plugins/CommonGame/Source/Public/CommonUIExtensions.h

67 lines
2.8 KiB
C
Raw Permalink Normal View History

2023-08-28 03:38:23 +08:00
// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Kismet/BlueprintFunctionLibrary.h"
#include "UObject/SoftObjectPtr.h"
#include "CommonUIExtensions.generated.h"
2025-07-15 00:36:32 +08:00
#define UE_API COMMONGAME_API
2023-08-28 03:38:23 +08:00
enum class ECommonInputType : uint8;
template <typename T> class TSubclassOf;
class APlayerController;
class UCommonActivatableWidget;
class ULocalPlayer;
class UObject;
class UUserWidget;
struct FFrame;
struct FGameplayTag;
2025-07-15 00:36:32 +08:00
UCLASS(MinimalAPI)
class UCommonUIExtensions : public UBlueprintFunctionLibrary
2023-08-28 03:38:23 +08:00
{
GENERATED_BODY()
public:
UCommonUIExtensions() { }
UFUNCTION(BlueprintPure, BlueprintCosmetic, Category = "Global UI Extensions", meta = (WorldContext = "WidgetContextObject"))
2025-07-15 00:36:32 +08:00
static UE_API ECommonInputType GetOwningPlayerInputType(const UUserWidget* WidgetContextObject);
2023-08-28 03:38:23 +08:00
UFUNCTION(BlueprintPure, BlueprintCosmetic, Category = "Global UI Extensions", meta = (WorldContext = "WidgetContextObject"))
2025-07-15 00:36:32 +08:00
static UE_API bool IsOwningPlayerUsingTouch(const UUserWidget* WidgetContextObject);
2023-08-28 03:38:23 +08:00
UFUNCTION(BlueprintPure, BlueprintCosmetic, Category = "Global UI Extensions", meta = (WorldContext = "WidgetContextObject"))
2025-07-15 00:36:32 +08:00
static UE_API bool IsOwningPlayerUsingGamepad(const UUserWidget* WidgetContextObject);
2023-08-28 03:38:23 +08:00
UFUNCTION(BlueprintCallable, BlueprintCosmetic, Category = "Global UI Extensions")
2025-07-15 00:36:32 +08:00
static UE_API UCommonActivatableWidget* PushContentToLayer_ForPlayer(const ULocalPlayer* LocalPlayer, UPARAM(meta = (Categories = "UI.Layer")) FGameplayTag LayerName, UPARAM(meta = (AllowAbstract = false)) TSubclassOf<UCommonActivatableWidget> WidgetClass);
2023-08-28 03:38:23 +08:00
UFUNCTION(BlueprintCallable, BlueprintCosmetic, Category = "Global UI Extensions")
2025-07-15 00:36:32 +08:00
static UE_API void PushStreamedContentToLayer_ForPlayer(const ULocalPlayer* LocalPlayer, UPARAM(meta = (Categories = "UI.Layer")) FGameplayTag LayerName, UPARAM(meta = (AllowAbstract = false)) TSoftClassPtr<UCommonActivatableWidget> WidgetClass);
2023-08-28 03:38:23 +08:00
UFUNCTION(BlueprintCallable, BlueprintCosmetic, Category = "Global UI Extensions")
2025-07-15 00:36:32 +08:00
static UE_API void PopContentFromLayer(UCommonActivatableWidget* ActivatableWidget);
2023-08-28 03:38:23 +08:00
UFUNCTION(BlueprintCallable, BlueprintCosmetic, Category = "Global UI Extensions")
2025-07-15 00:36:32 +08:00
static UE_API ULocalPlayer* GetLocalPlayerFromController(APlayerController* PlayerController);
2023-08-28 03:38:23 +08:00
UFUNCTION(BlueprintCallable, BlueprintCosmetic, Category = "Global UI Extensions")
2025-07-15 00:36:32 +08:00
static UE_API FName SuspendInputForPlayer(APlayerController* PlayerController, FName SuspendReason);
2023-08-28 03:38:23 +08:00
2025-07-15 00:36:32 +08:00
static UE_API FName SuspendInputForPlayer(ULocalPlayer* LocalPlayer, FName SuspendReason);
2023-08-28 03:38:23 +08:00
UFUNCTION(BlueprintCallable, BlueprintCosmetic, Category = "Global UI Extensions")
2025-07-15 00:36:32 +08:00
static UE_API void ResumeInputForPlayer(APlayerController* PlayerController, FName SuspendToken);
2023-08-28 03:38:23 +08:00
2025-07-15 00:36:32 +08:00
static UE_API void ResumeInputForPlayer(ULocalPlayer* LocalPlayer, FName SuspendToken);
2023-08-28 03:38:23 +08:00
private:
2025-07-15 00:36:32 +08:00
static UE_API int32 InputSuspensions;
2023-08-28 03:38:23 +08:00
};
2025-07-15 00:36:32 +08:00
#undef UE_API