Payback 0.0.1
CK Graduation Project
로딩중...
검색중...
일치하는것 없음
UserPresenterBase.h
이 파일의 문서화 페이지로 가기
1// Fill out your copyright notice in the Description page of Project Settings.
2
3#pragma once
4
5#include "CK_UE.h"
6#include "InputCoreTypes.h"
8#include "UObject/Object.h"
9#include "UserPresenterBase.generated.h"
10
11class UUserWidgetBase;
12class APlayerController;
13class UEnhancedInputComponent;
17UCLASS(Abstract, BlueprintType, Blueprintable)
18class CK_UE_API UUserPresenterBase : public UObject, public IWidgetPresenterInterface
19{
20 GENERATED_BODY()
21
22public:
23 virtual void InitializePresenter(UUIManagementSubsystem* Subsystem) override;
24 virtual void DeinitializePresenter() override;
25
26 virtual void OnViewUnbound(UUserWidgetBase* View) override;
27 virtual void OnViewBound(UUserWidgetBase* View) override;
28 virtual UWorld* GetWorld() const override;
29
30public:
31 UFUNCTION(BlueprintPure, Category = "UI|Presenter")
32 FORCEINLINE UUIManagementSubsystem* GetUISubsystem() const
33 {
34 return UISubsystem.Get();
35 }
36
37public:
38 // BP 입력을 등록하고 UI Context로 전환한다. Keys는 일반 키만 필터링하며 빈 배열도 Input Action을 연결한다.
39 UFUNCTION(BlueprintCallable, Category = "UI|Presenter|Input")
40 void SetInputKeys(APlayerController* PlayerController, const TArray<FKey>& Keys, int32 Priority = 100);
41
42 UFUNCTION(BlueprintCallable, Category = "UI|Presenter|Input")
43 void DisableInput();
44
45protected:
46 UFUNCTION(BlueprintImplementableEvent, Category = "UI|Presenter")
47 void ReceiveInitializePresenter(UUIManagementSubsystem* Subsystem);
48
49 UFUNCTION(BlueprintImplementableEvent, Category = "UI|Presenter")
50 void ReceiveDeinitializePresenter();
51
52 UFUNCTION(BlueprintImplementableEvent, Category = "UI|Presenter")
53 void ReceiveViewBound(UUserWidgetBase* View);
54
55 UFUNCTION(BlueprintImplementableEvent, Category = "UI|Presenter")
56 void ReceiveViewUnbound(UUserWidgetBase* View);
57
58private:
59 UPROPERTY(Transient)
60 TObjectPtr<UEnhancedInputComponent> InputComponent;
61
62 TWeakObjectPtr<APlayerController> InputController;
63 TWeakObjectPtr<UUIManagementSubsystem> UISubsystem;
64};
Definition WidgetPresenterInterface.h:17
Definition UIManagementSubsystem.h:28
Definition UserPresenterBase.h:19
Definition UserWidgetBase.h:35