Payback 0.0.1
CK Graduation Project
로딩중...
검색중...
일치하는것 없음
UConstellationListPanelWidget 클래스 참조

#include <ConstellationListPanelWidget.h>

UConstellationListPanelWidget에 대한 상속 다이어그램 :
Inheritance graph
UConstellationListPanelWidget에 대한 협력 다이어그램:
Collaboration graph

Protected 멤버 함수

virtual void NativeConstruct () override
 
virtual void NativeDestruct () override
 
void HandleConstellationRegistered (UConstellationBase *Constellation)
 
UConstellationEntryWidgetFindEntry (const UConstellationBase *Constellation) const
 
- UPopupWidgetBase(으)로부터 상속된 Protected 멤버 함수
void OnCloseRequested (EPopupResult Result)
 
virtual void OnCloseRequested_Implementation (EPopupResult Result)
 
- UUserWidgetBase(으)로부터 상속된 Protected 멤버 함수
virtual void OnWidgetActivated ()
 
virtual void OnWidgetDeactivated ()
 
void OnPushedToLayer_Internal ()
 
void OnPoppedFromLayer_Internal ()
 
void OnActivated_Internal ()
 
void OnDeactivated_Internal ()
 

Protected 속성

TObjectPtr< UUniformGridPanel > ConstellationGrid
 
TSubclassOf< UConstellationEntryWidgetEntryClass
 
int32 ColumnCount = 3
 
- UUserWidgetBase(으)로부터 상속된 Protected 속성
EWidgetState WidgetState
 
TObjectPtr< UAbilitySystemComponent > ASC
 
FGameplayTag LayerTag
 
bool bPrimary = false
 
TObjectPtr< UWidgetAnimation > AppearanceAnim
 
TObjectPtr< UWidgetAnimation > DisappearanceAnim
 

Private 속성

TArray< TObjectPtr< UConstellationEntryWidget > > Entries
 

추가로 상속된 멤버들

- UPopupWidgetBase(으)로부터 상속된 Public 멤버 함수
virtual void OnPoppedFromLayer () override
 
virtual void BeginDestroy () override
 
void Close (EPopupResult Result)
 
void FinishClose ()
 
FORCEINLINE EPopupResult GetResult () const
 
FORCEINLINE bool IsClosing () const
 
- UUserWidgetBase(으)로부터 상속된 Public 멤버 함수
virtual void SetAbilitySystemComponent (AActor *InOwner)
 
virtual UAbilitySystemComponent * GetAbilitySystemComponent () const override
 
virtual void OnPushedToLayer ()
 
virtual void OnActivated ()
 
virtual void OnDeactivated ()
 
void Activate ()
 
void Deactivate ()
 
FORCEINLINE FGameplayTag GetLayerTag () const
 
FORCEINLINE void SetLayerTag (const FGameplayTag InTag)
 
FORCEINLINE bool IsPrimary () const
 
FORCEINLINE void SetPrimary (const bool InPrimary)
 
FORCEINLINE EWidgetState GetWidgetState () const
 
FORCEINLINE void SetWidgetState (const EWidgetState InState)
 
FORCEINLINE UWaitForWidgetActivationGetActivationHandle ()
 
FORCEINLINE bool HasAppearanceAnim () const
 
FORCEINLINE bool HasDisappearanceAnim () const
 
- UPopupWidgetBase(으)로부터 상속된 Public 속성
FOnPopupClosed OnPopupClosed
 

상세한 설명

현재 시청 중인 성좌를 격자로 보여주는 패널. 한 행에 ColumnCount 개씩 채우며, 세로 스크롤은 BP 에서 그리드를 ScrollBox 안에 넣어 처리한다.

멤버 함수 문서화

◆ FindEntry()

UConstellationEntryWidget * UConstellationListPanelWidget::FindEntry ( const UConstellationBase Constellation) const
protected
89{
90 auto MatchesConstellation = [Constellation](const UConstellationEntryWidget* Entry)
91 {
92 return Entry && Entry->GetBoundConstellation() == Constellation;
93 };
94
95 const TObjectPtr<UConstellationEntryWidget>* Found = Entries.FindByPredicate(MatchesConstellation);
96
97 return Found ? *Found : nullptr;
98}
Definition ConstellationEntryWidget.h:21
TArray< TObjectPtr< UConstellationEntryWidget > > Entries
Definition ConstellationListPanelWidget.h:46
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ HandleConstellationRegistered()

void UConstellationListPanelWidget::HandleConstellationRegistered ( UConstellationBase Constellation)
protected
50{
51 if (Constellation == nullptr || ConstellationGrid == nullptr)
52 {
53 return;
54 }
55
56 // 초기 채우기와 델리게이트가 겹칠 수 있으므로 중복을 막는다.
57 if (FindEntry(Constellation))
58 {
59 return;
60 }
61
62 if (EntryClass == nullptr)
63 {
64 LOG_WARNING(LogCK, "EntryClass 가 비어 있어 성좌 항목을 만들 수 없습니다.");
65 return;
66 }
67
68 UConstellationEntryWidget* Entry = CreateWidget<UConstellationEntryWidget>(GetOwningPlayer(), EntryClass);
69 if (Entry == nullptr)
70 {
71 return;
72 }
73
74 const FConstellationData& Data = Constellation->GetConstellationData();
75
76 // 아이콘은 소프트 참조라 표시 직전에 로드한다.
77 Entry->SetupEntry(Constellation, Data.Icon.LoadSynchronous(), Constellation->BuildDisplayName(), FText::FromString(BroadcastTag::ToDisplayString(Data.ReactionTags)));
78
79 // 추가 순서대로 왼쪽에서 오른쪽으로 채우고 행을 넘긴다.
80 const int32 Index = Entries.Num();
81 ConstellationGrid->AddChildToUniformGrid(Entry, Index / ColumnCount, Index % ColumnCount);
82
83 Entries.Add(Entry);
84}
#define LOG_WARNING(Category, Format,...)
Definition CK_UE.h:39
FORCEINLINE const FConstellationData & GetConstellationData() const
Definition ConstellationBase.h:53
FText BuildDisplayName() const
Definition ConstellationBase.cpp:20
void SetupEntry(UConstellationBase *InConstellation, UTexture2D *InIcon, const FText &InConstellationName, const FText &InReactionTagText)
Definition ConstellationEntryWidget.cpp:12
TObjectPtr< UUniformGridPanel > ConstellationGrid
Definition ConstellationListPanelWidget.h:34
UConstellationEntryWidget * FindEntry(const UConstellationBase *Constellation) const
Definition ConstellationListPanelWidget.cpp:88
int32 ColumnCount
Definition ConstellationListPanelWidget.h:40
TSubclassOf< UConstellationEntryWidget > EntryClass
Definition ConstellationListPanelWidget.h:37
CK_UE_API FString ToDisplayString(ESituationTag Tags)
Definition SituationTag.cpp:28
Definition ConstellationData.h:16
TSoftObjectPtr< UTexture2D > Icon
Definition ConstellationData.h:46
ESituationTag ReactionTags
Definition ConstellationData.h:35
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ NativeConstruct()

void UConstellationListPanelWidget::NativeConstruct ( )
overrideprotectedvirtual
17{
18 Super::NativeConstruct();
19
20 UStreamingSubsystem* ConstellationSubsystem = GetWorld()->GetSubsystem<UStreamingSubsystem>();
21 if (ConstellationSubsystem == nullptr)
22 {
23 return;
24 }
25
27
28 // 패널이 뒤늦게 열려도 이미 합류한 성좌가 모두 보이도록 초기 상태를 채운다.
29 for (UConstellationBase* Constellation : ConstellationSubsystem->GetConstellations())
30 {
31 HandleConstellationRegistered(Constellation);
32 }
33}
Definition ConstellationBase.h:35
void HandleConstellationRegistered(UConstellationBase *Constellation)
Definition ConstellationListPanelWidget.cpp:49
Definition StreamingSubsystem.h:73
FOnConstellationRegistered OnConstellationRegistered
Definition StreamingSubsystem.h:125
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ NativeDestruct()

void UConstellationListPanelWidget::NativeDestruct ( )
overrideprotectedvirtual
37{
38 if (UStreamingSubsystem* ConstellationSubsystem = GetWorld()->GetSubsystem<UStreamingSubsystem>())
39 {
40 ConstellationSubsystem->OnConstellationRegistered.RemoveAll(this);
41 }
42
43 Entries.Empty();
44
45 Super::NativeDestruct();
46}

멤버 데이터 문서화

◆ ColumnCount

int32 UConstellationListPanelWidget::ColumnCount = 3
protected

◆ ConstellationGrid

TObjectPtr<UUniformGridPanel> UConstellationListPanelWidget::ConstellationGrid
protected

◆ Entries

TArray<TObjectPtr<UConstellationEntryWidget> > UConstellationListPanelWidget::Entries
private

◆ EntryClass

TSubclassOf<UConstellationEntryWidget> UConstellationListPanelWidget::EntryClass
protected

이 클래스에 대한 문서화 페이지는 다음의 파일들로부터 생성되었습니다.: