KLingo Project Documentation 1.0.0
Unreal Engine 5.6 C++ Project Documentation
로딩중...
검색중...
일치하는것 없음
UResultStatWidget 클래스 참조

#include <UResultStatWidget.h>

+ UResultStatWidget에 대한 상속 다이어그램 :
+ UResultStatWidget에 대한 협력 다이어그램:

Public 멤버 함수

void InitData (const FResultStatData &InData)
 통합 데이터로 위젯 설정
 
void SetColorType (const EColorStyleType InType)
 스타일 설정
 
void SetGradeValue (const EResourceTextureType TextureType)
 패널 데이터 설정
 
void SetRateValue (const float InPercent)
 
void SetScoreValue (const float InValue, const FLinearColor InScoreTextColor)
 
void SetSymbolValue (const EResourceTextureType TextureType, const FString &InValue)
 
void SetTitleText (const FText InText)
 
void SetWidgetType (const EResultItemWidgetType InType)
 위젯 타입 설정
 

Public 속성

TObjectPtr< class UBorder > Border_Title
 
EColorStyleType ColorType
 
float GradeValue = 0.f
 
TObjectPtr< class UImage > Image_BG
 
TObjectPtr< class UImage > Image_Grade
 
TObjectPtr< class UImage > Image_Symbol
 
TObjectPtr< class UCircularProgressBarImageProgress_Rate
 
float RateValue = 0.f
 
FLinearColor ScoreTextColor = FLinearColor::White
 
float ScoreValue = 0.f
 
TMap< EColorStyleType, FColorStyleDataStyleTable
 
FString SymbolValue
 
TObjectPtr< class UTextBlock > Text_Title
 
TObjectPtr< class UTextBlock > Txt_ImageRate
 
TObjectPtr< class UTextBlock > Txt_Rate
 
TObjectPtr< class UTextBlock > Txt_Score
 
TObjectPtr< class UWidgetSwitcher > WidgetSwitcher
 
EResultItemWidgetType WidgetType
 

Protected 멤버 함수

virtual void NativePreConstruct () override
 

Private 멤버 함수

void ApplyStyle ()
 
void LoadStyleTable ()
 
void UpdateWidgetPanel () const
 

상세한 설명

UResultStatWidget.h 파일의 14 번째 라인에서 정의되었습니다.

멤버 함수 문서화

◆ ApplyStyle()

void UResultStatWidget::ApplyStyle ( )
private

UResultStatWidget.cpp 파일의 182 번째 라인에서 정의되었습니다.

183{
184 if (!StyleTable.Contains(ColorType))
185 return;
186
187 const auto& Style = StyleTable[ColorType];
188
189 if (Image_BG)
190 Image_BG->SetColorAndOpacity(Style.BGColor);
191
192 if (Border_Title)
193 Border_Title->SetBrushColor(Style.BorderColor);
194
195 if (Text_Title)
196 Text_Title->SetColorAndOpacity(Style.TitleColor);
197}
TObjectPtr< class UImage > Image_BG
TMap< EColorStyleType, FColorStyleData > StyleTable
TObjectPtr< class UBorder > Border_Title
TObjectPtr< class UTextBlock > Text_Title
EColorStyleType ColorType

다음을 참조함 : Border_Title, ColorType, Image_BG, StyleTable, Text_Title.

다음에 의해서 참조됨 : NativePreConstruct(), SetColorType().

+ 이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ InitData()

void UResultStatWidget::InitData ( const FResultStatData InData)

통합 데이터로 위젯 설정

UResultStatWidget.cpp 파일의 28 번째 라인에서 정의되었습니다.

29{
30 // 색상 타입 설정
31 SetColorType(InData.ColorType);
32
33 // 위젯 타입 설정
35
36 // 타이틀 텍스트 설정
37 SetTitleText(InData.TitleText);
38
39 // 타입별 데이터 설정
40 switch (InData.WidgetType)
41 {
44 break;
45
48 break;
49
52 break;
53
56 break;
57 }
58}
void SetWidgetType(const EResultItemWidgetType InType)
위젯 타입 설정
void SetSymbolValue(const EResourceTextureType TextureType, const FString &InValue)
void SetRateValue(const float InPercent)
void SetColorType(const EColorStyleType InType)
스타일 설정
void SetGradeValue(const EResourceTextureType TextureType)
패널 데이터 설정
void SetTitleText(const FText InText)
void SetScoreValue(const float InValue, const FLinearColor InScoreTextColor)
EResourceTextureType SymbolTextureType
Symbol 타입 전용: 심볼 문자열
FLinearColor ScoreTextColor
float RatePercent
Rate 타입 전용: 퍼센트 값 (0.0 ~ 1.0)
EColorStyleType ColorType
색상 스타일
FText TitleText
타이틀 텍스트
EResultItemWidgetType WidgetType
위젯 타입
EResourceTextureType GradeTextureType
Grade 타입 전용: 텍스처 타입
float ScoreValue
Score 타입 전용: 점수 값

다음을 참조함 : FResultStatData::ColorType, Grade, FResultStatData::GradeTextureType, Rate, FResultStatData::RatePercent, Score, FResultStatData::ScoreTextColor, FResultStatData::ScoreValue, SetColorType(), SetGradeValue(), SetRateValue(), SetScoreValue(), SetSymbolValue(), SetTitleText(), SetWidgetType(), Symbol, FResultStatData::SymbolTextureType, FResultStatData::SymbolValue, FResultStatData::TitleText, FResultStatData::WidgetType.

+ 이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ LoadStyleTable()

void UResultStatWidget::LoadStyleTable ( )
private

UResultStatWidget.cpp 파일의 154 번째 라인에서 정의되었습니다.

155{
156 if (auto DM = UGameDataManager::Get(this))
157 {
158 // 런타임: GameDataManager에서 가져오기
159 StyleTable = DM->GetAllColorStyleData();
160 return;
161 }
162
163#if WITH_EDITOR
164 // 에디터 모드: DataTable 직접 로드
165 if (auto ColorStyleTable = LoadObject<UDataTable>(nullptr, COLORSTYLEDATA_PATH ))
166 {
167 for (const FName& RowName : ColorStyleTable->GetRowNames())
168 {
169 if (FColorStyleData* Row = ColorStyleTable->FindRow<FColorStyleData>(RowName, TEXT("")))
170 {
171 FString EnumString = RowName.ToString();
172 EColorStyleType TempColorType = static_cast<EColorStyleType>(
173 StaticEnum<EColorStyleType>()->GetValueByNameString(EnumString)
174 );
175 StyleTable.Add(TempColorType, *Row);
176 }
177 }
178 }
179#endif
180}
EColorStyleType
#define COLORSTYLEDATA_PATH

다음을 참조함 : COLORSTYLEDATA_PATH, StyleTable.

다음에 의해서 참조됨 : NativePreConstruct().

+ 이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ NativePreConstruct()

void UResultStatWidget::NativePreConstruct ( )
overrideprotectedvirtual

UResultStatWidget.cpp 파일의 14 번째 라인에서 정의되었습니다.

15{
16 Super::NativePreConstruct();
17
18 // StyleTable이 비어있으면 자동으로 로드
19 if (StyleTable.Num() == 0)
20 {
22 }
23
25 ApplyStyle();
26}
void UpdateWidgetPanel() const

다음을 참조함 : ApplyStyle(), LoadStyleTable(), StyleTable, UpdateWidgetPanel().

+ 이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ SetColorType()

void UResultStatWidget::SetColorType ( const EColorStyleType  InType)

스타일 설정

UResultStatWidget.cpp 파일의 69 번째 라인에서 정의되었습니다.

70{
71 ColorType = InType;
72 ApplyStyle();
73}

다음을 참조함 : ApplyStyle(), ColorType.

다음에 의해서 참조됨 : InitData().

+ 이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
+ 이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ SetGradeValue()

void UResultStatWidget::SetGradeValue ( const EResourceTextureType  TextureType)

패널 데이터 설정

UResultStatWidget.cpp 파일의 81 번째 라인에서 정의되었습니다.

82{
83 if (!Image_Grade)
84 return;
85
86 // GameDataManager에서 TextureType에 해당하는 텍스처 가져오기
87 UGameDataManager* DataManager = UGameDataManager::Get(this);
88 if (!DataManager)
89 return;
90
91 UTexture2D* Texture = DataManager->GetTexture(TextureType);
92 if (!Texture)
93 return;
94
95 // Image의 Brush 데이터 변경
96 FSlateBrush Brush = Image_Grade->GetBrush();
97 Brush.SetResourceObject(Texture);
98 Image_Grade->SetBrush(Brush);
99}
데이터 테이블(.csv)에서 게임 데이터를 로드하고 캐시하여 런타임에 빠르게 접근할 수 있도록 제공하는 데이터 관리 서브시스템입니다.
UTexture2D * GetTexture(EResourceTextureType Type) const
TObjectPtr< class UImage > Image_Grade

다음을 참조함 : UGameDataManager::GetTexture(), Image_Grade.

다음에 의해서 참조됨 : InitData().

+ 이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
+ 이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ SetRateValue()

void UResultStatWidget::SetRateValue ( const float  InPercent)

UResultStatWidget.cpp 파일의 113 번째 라인에서 정의되었습니다.

114{
115 RateValue = InPercent;
116
117 if (Txt_Rate)
118 {
119 FString Str = FString::Printf(TEXT("%.1f%%"), InPercent * 100.f);
120 Txt_Rate->SetText(FText::FromString(Str));
121 }
122
123 ImageProgress_Rate->SetPercent(InPercent);
124}
TObjectPtr< class UTextBlock > Txt_Rate
TObjectPtr< class UCircularProgressBar > ImageProgress_Rate

다음을 참조함 : ImageProgress_Rate, RateValue, Txt_Rate.

다음에 의해서 참조됨 : InitData().

+ 이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ SetScoreValue()

void UResultStatWidget::SetScoreValue ( const float  InValue,
const FLinearColor  InScoreTextColor 
)

UResultStatWidget.cpp 파일의 101 번째 라인에서 정의되었습니다.

102{
103 ScoreValue = InValue;
104 ScoreTextColor = InScoreTextColor;
105
106 if (Txt_Score)
107 {
108 Txt_Score->SetText(FText::AsNumber(InValue));
109 Txt_Score->SetColorAndOpacity(ScoreTextColor);
110 }
111}
FLinearColor ScoreTextColor
TObjectPtr< class UTextBlock > Txt_Score

다음을 참조함 : ScoreTextColor, ScoreValue, Txt_Score.

다음에 의해서 참조됨 : InitData().

+ 이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ SetSymbolValue()

void UResultStatWidget::SetSymbolValue ( const EResourceTextureType  TextureType,
const FString &  InValue 
)

UResultStatWidget.cpp 파일의 126 번째 라인에서 정의되었습니다.

127{
128 SymbolValue = InValue;
129
130 if (!Image_Grade)
131 return;
132
133 // GameDataManager에서 TextureType에 해당하는 텍스처 가져오기
134 UGameDataManager* DataManager = UGameDataManager::Get(this);
135 if (!DataManager)
136 return;
137
138 UTexture2D* Texture = DataManager->GetTexture(TextureType);
139 if (!Texture)
140 return;
141
142 // Image의 Brush 데이터 변경
143 FSlateBrush Brush = Image_Symbol->GetBrush();
144 Brush.SetResourceObject(Texture);
145 Image_Symbol->SetBrush(Brush);
146
147 if (Txt_ImageRate)
148 Txt_ImageRate->SetText(FText::FromString(InValue));
149}
TObjectPtr< class UTextBlock > Txt_ImageRate
TObjectPtr< class UImage > Image_Symbol

다음을 참조함 : UGameDataManager::GetTexture(), Image_Grade, Image_Symbol, SymbolValue, Txt_ImageRate.

다음에 의해서 참조됨 : InitData().

+ 이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
+ 이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ SetTitleText()

void UResultStatWidget::SetTitleText ( const FText  InText)

UResultStatWidget.cpp 파일의 75 번째 라인에서 정의되었습니다.

76{
77 Text_Title->SetText(InText);
78}

다음을 참조함 : Text_Title.

다음에 의해서 참조됨 : InitData().

+ 이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ SetWidgetType()

void UResultStatWidget::SetWidgetType ( const EResultItemWidgetType  InType)

위젯 타입 설정

UResultStatWidget.cpp 파일의 63 번째 라인에서 정의되었습니다.

64{
65 WidgetType = InType;
67}
EResultItemWidgetType WidgetType

다음을 참조함 : UpdateWidgetPanel(), WidgetType.

다음에 의해서 참조됨 : InitData().

+ 이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
+ 이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ UpdateWidgetPanel()

void UResultStatWidget::UpdateWidgetPanel ( ) const
private

UResultStatWidget.cpp 파일의 202 번째 라인에서 정의되었습니다.

203{
204 if (!WidgetSwitcher)
205 return;
206
207 int32 Index = 0;
208
209 switch (WidgetType)
210 {
212 Index = 0;
213 break;
214
216 Index = 1;
217 break;
218
220 Index = 2;
221 break;
222
224 Index = 3;
225 break;
226 }
227
228 WidgetSwitcher->SetActiveWidgetIndex(Index);
229}
TObjectPtr< class UWidgetSwitcher > WidgetSwitcher

다음을 참조함 : Grade, Rate, Score, Symbol, WidgetSwitcher, WidgetType.

다음에 의해서 참조됨 : NativePreConstruct(), SetWidgetType().

+ 이 함수를 호출하는 함수들에 대한 그래프입니다.:

멤버 데이터 문서화

◆ Border_Title

TObjectPtr<class UBorder> UResultStatWidget::Border_Title

UResultStatWidget.h 파일의 65 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : ApplyStyle().

◆ ColorType

EColorStyleType UResultStatWidget::ColorType

UResultStatWidget.h 파일의 100 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : ApplyStyle(), SetColorType().

◆ GradeValue

float UResultStatWidget::GradeValue = 0.f

UResultStatWidget.h 파일의 109 번째 라인에서 정의되었습니다.

◆ Image_BG

TObjectPtr<class UImage> UResultStatWidget::Image_BG

UResultStatWidget.h 파일의 62 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : ApplyStyle().

◆ Image_Grade

TObjectPtr<class UImage> UResultStatWidget::Image_Grade

UResultStatWidget.h 파일의 75 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : SetGradeValue(), SetSymbolValue().

◆ Image_Symbol

TObjectPtr<class UImage> UResultStatWidget::Image_Symbol

UResultStatWidget.h 파일의 90 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : SetSymbolValue().

◆ ImageProgress_Rate

TObjectPtr<class UCircularProgressBar> UResultStatWidget::ImageProgress_Rate

UResultStatWidget.h 파일의 86 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : SetRateValue().

◆ RateValue

float UResultStatWidget::RateValue = 0.f

UResultStatWidget.h 파일의 112 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : SetRateValue().

◆ ScoreTextColor

FLinearColor UResultStatWidget::ScoreTextColor = FLinearColor::White

UResultStatWidget.h 파일의 111 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : SetScoreValue().

◆ ScoreValue

float UResultStatWidget::ScoreValue = 0.f

UResultStatWidget.h 파일의 110 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : SetScoreValue().

◆ StyleTable

TMap<EColorStyleType, FColorStyleData> UResultStatWidget::StyleTable

UResultStatWidget.h 파일의 103 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : ApplyStyle(), LoadStyleTable(), NativePreConstruct().

◆ SymbolValue

FString UResultStatWidget::SymbolValue

UResultStatWidget.h 파일의 113 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : SetSymbolValue().

◆ Text_Title

TObjectPtr<class UTextBlock> UResultStatWidget::Text_Title

UResultStatWidget.h 파일의 68 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : ApplyStyle(), SetTitleText().

◆ Txt_ImageRate

TObjectPtr<class UTextBlock> UResultStatWidget::Txt_ImageRate

UResultStatWidget.h 파일의 93 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : SetSymbolValue().

◆ Txt_Rate

TObjectPtr<class UTextBlock> UResultStatWidget::Txt_Rate

UResultStatWidget.h 파일의 83 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : SetRateValue().

◆ Txt_Score

TObjectPtr<class UTextBlock> UResultStatWidget::Txt_Score

UResultStatWidget.h 파일의 79 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : SetScoreValue().

◆ WidgetSwitcher

TObjectPtr<class UWidgetSwitcher> UResultStatWidget::WidgetSwitcher

UResultStatWidget.h 파일의 71 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : UpdateWidgetPanel().

◆ WidgetType

EResultItemWidgetType UResultStatWidget::WidgetType

UResultStatWidget.h 파일의 106 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : SetWidgetType(), UpdateWidgetPanel().


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