Payback 0.0.1
CK Graduation Project
로딩중...
검색중...
일치하는것 없음
ConstellationBuffHUDWidget.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 "UI/UserWidgetBase.h"
7#include "ConstellationBuffHUDWidget.generated.h"
8
10class UPanelWidget;
11class USituationBase;
12
19UCLASS()
21{
22 GENERATED_BODY()
23
24protected:
25 virtual void NativeConstruct() override;
26 virtual void NativeDestruct() override;
27 virtual void NativeTick(const FGeometry& MyGeometry, float InDeltaTime) override;
28
29protected:
30 void HandleBuffApplied(USituationBase* Situation);
31 void HandleBuffRemoved(USituationBase* Situation);
32
33 UConstellationBuffSlotWidget* FindSlot(const USituationBase* Situation) const;
34
35 // UniformGridPanel 은 슬롯의 Row/Column 기본값이 둘 다 0 이라 지정하지 않으면 전부 같은 칸에 겹친다.
36 // 추가/제거 후 남은 슬롯을 앞에서부터 다시 채워 빈칸이 생기지 않게 한다.
37 void ReflowSlots();
38
39protected:
40 UPROPERTY(BlueprintReadOnly, Category = "UI|Constellation", meta = (BindWidget))
41 TObjectPtr<UPanelWidget> BuffSlotContainer;
42
43 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "UI|Constellation")
44 TSubclassOf<UConstellationBuffSlotWidget> BuffSlotClass;
45
46 // 한 행에 배치할 슬롯 수. BuffSlotContainer 가 UniformGridPanel 일 때만 쓰인다.
47 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "UI|Constellation", meta = (ClampMin = "1"))
48 int32 SlotsPerRow = 5;
49
50private:
51 // 남은 시간과 총 지속 시간은 매번 GE 에 직접 물어보므로 여기서 캐싱하지 않는다.
53 {
54 TWeakObjectPtr<USituationBase> Situation;
55 TWeakObjectPtr<UConstellationBuffSlotWidget> Slot;
56 };
57
58private:
59 TArray<FTrackedSlot> TrackedSlots;
60};
Definition ConstellationBuffHUDWidget.h:21
TArray< FTrackedSlot > TrackedSlots
Definition ConstellationBuffHUDWidget.h:59
Definition ConstellationBuffSlotWidget.h:22
Definition SituationBase.h:31
TObjectPtr< UConstellationBase > Constellation
Definition SituationBase.h:160
Definition UserWidgetBase.h:33
Definition ConstellationBuffHUDWidget.h:53
TWeakObjectPtr< UConstellationBuffSlotWidget > Slot
Definition ConstellationBuffHUDWidget.h:55
TWeakObjectPtr< USituationBase > Situation
Definition ConstellationBuffHUDWidget.h:54