Payback 0.0.1
CK Graduation Project
로딩중...
검색중...
일치하는것 없음
UISettings.h
이 파일의 문서화 페이지로 가기
1// Fill out your copyright notice in the Description page of Project Settings.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "Engine/DeveloperSettings.h"
7#include "GameplayTagContainer.h"
8#include "Data/UI/UIContext.h"
9#include "UISettings.generated.h"
10
11
12class UInputMappingContext;
13class UInputAction;
14class UUserWidgetBase;
15
16USTRUCT(BlueprintType)
18{
19 GENERATED_BODY()
20
21 // 레이어 우선순위. 높을수록 상위 레이어로 취급.
22 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Layer")
23 int32 Priority = 0;
24
25 // 해당 레이어가 활성화될 때 마우스 커서를 표시할지 여부
26 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Input")
27 bool bShowMouseCursor = false;
28
29 // 마우스 잠금 모드 (bShowMouseCursor = true 일 때만 적용)
30 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Input", meta = (EditCondition = "bShowMouseCursor"))
31 EMouseLockMode MouseLockMode = EMouseLockMode::DoNotLock;
32
33 // 해당 레이어가 활성화될 때 플레이어 이동 입력을 차단할지 여부
34 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Input")
35 bool bBlockPlayerMovement = false;
36
37 // 해당 레이어가 활성화될 때 플레이어 키 입력을 차단할지 여부
38 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Input")
39 bool bBlockPlayerInput = false;
40
41 // 해당 레이어가 활성화될 때 적용할 전역 시간 배율
42 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Time", meta = (ClampMin = "0.0", UIMin = "0.0"))
43 float TimeScale = 1.0f;
44};
45
46
47UCLASS(Config=Game, defaultconfig, meta=(DisplayName="UI Settings"))
48class CK_UE_API UUISettings : public UDeveloperSettings
49{
50 GENERATED_BODY()
51
52public:
53 static const UUISettings* Get()
54 {
55 return GetDefault<UUISettings>();
56 }
57
58public:
59 virtual FName GetCategoryName() const override
60 {
61 return TEXT("CK_UE");
62 }
63
64 int32 GetLayerPriority(const FGameplayTag& LayerTag) const
65 {
66 const FUILayerConfig* Config = LayerConfigs.Find(LayerTag);
67 return Config ? Config->Priority : 0;
68 }
69
70public:
71 // 레이어 스택이 완전히 비었을 때 적용할 기본 입력 설정.
72 UPROPERTY(EditAnywhere, Config, Category = "Layer")
73 FUILayerConfig DefaultConfig;
74
75 // 레이어 태그별 설정. 등록되지 않은 레이어는 기본값(Priority 0) 적용.
76 UPROPERTY(EditAnywhere, Config, Category = "Layer", meta = (Categories = "UI.Layer"))
77 TMap<FGameplayTag, FUILayerConfig> LayerConfigs;
78
79 UPROPERTY(EditAnywhere, Config, Category = "Input")
80 TSoftObjectPtr<UInputMappingContext> UIInputMap;
81
82 UPROPERTY(EditAnywhere, Config, Category = "Input")
83 TSoftObjectPtr<UInputMappingContext> BridgeInputMap;
84
85 // Popup 유무와 관계없이 유지하는 게임 공통 입력.
86 UPROPERTY(EditAnywhere, Config, Category = "Input")
87 TSoftObjectPtr<UInputMappingContext> GameInputMap;
88
89 UPROPERTY(EditAnywhere, Config, Category = "Input")
90 TSoftObjectPtr<UInputAction> BackInputAction;
91
92 UPROPERTY(EditAnywhere, BlueprintReadOnly, Config, Category = "UI")
93 FUIContext PauseMenuWidgetContext;
94};
Definition UISettings.h:49
virtual FName GetCategoryName() const override
Definition UISettings.h:59
int32 GetLayerPriority(const FGameplayTag &LayerTag) const
Definition UISettings.h:64
static const UUISettings * Get()
Definition UISettings.h:53
Definition UserWidgetBase.h:35
FGameplayTag LayerTag
Definition UserWidgetBase.h:170
Definition UIContext.h:10
Definition UISettings.h:18
int32 Priority
Definition UISettings.h:23