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

#include <SkillSlotWidget.h>

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

Public 멤버 함수

virtual void SetAbilitySystemComponent (AActor *InOwner) override
 
FORCEINLINE EInputIconType GetInputIcon () const
 
FORCEINLINE const FText & GetKeyboardKeyText () const
 
FORCEINLINE EMouseButtonType GetMouseButton () const
 
- UUserWidgetBase(으)로부터 상속된 Public 멤버 함수
virtual UAbilitySystemComponent * GetAbilitySystemComponent () const override
 
virtual void OnPushedToLayer ()
 
virtual void OnPoppedFromLayer ()
 
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
 

Protected 멤버 함수

virtual void NativeConstruct () override
 
virtual void NativeDestruct () override
 
void StartCooldownUpdateTimer ()
 
void StopCooldownUpdateTimer ()
 
void UnbindCooldownTagEvent ()
 
void UpdateCooldownProgress ()
 
void BindCooldownTagEvent ()
 
void SetCooldownProgress (float InProgress)
 
virtual void NativePreConstruct () override
 
virtual void OnSlotRefreshed ()
 
void OnCooldownStarted ()
 
void OnCooldownCompleted ()
 
void OnCooldownTagChanged (const FGameplayTag Tag, int32 NewCount)
 
- UUserWidgetBase(으)로부터 상속된 Protected 멤버 함수
virtual void OnWidgetActivated ()
 
virtual void OnWidgetDeactivated ()
 
void OnPushedToLayer_Internal ()
 
void OnPoppedFromLayer_Internal ()
 
void OnActivated_Internal ()
 
void OnDeactivated_Internal ()
 

Protected 속성

bool bUseCooldownGauge = false
 
bool bReverseGaugeFillDirection = false
 
float SkillIconCooldownOpacity = 0.37f
 
FGameplayTag CooldownTargetAbilityTag = FGameplayTag::EmptyTag
 
FName ProgressParameterName = TEXT("Progress")
 
EInputIconType InputIcon
 
FText KeyboardKeyText
 
EMouseButtonType MouseButton
 
FSlateBrush KeyBoxImageBrush
 
FSlateBrush IconBrush
 
FSlateBrush GaugeBrush
 
TObjectPtr< UImage > SkillIcon
 
TObjectPtr< UImage > GaugeIcon
 
TObjectPtr< UImage > ReadyGlowImage
 
TObjectPtr< UImage > MouseLeftIcon
 
TObjectPtr< UImage > MouseRightIcon
 
TObjectPtr< UOverlay > MouseButtonIcon
 
TObjectPtr< UTextBlock > KeyText
 
TObjectPtr< UImage > KeyBoxImage
 
TObjectPtr< UOverlay > KeyboardKeyIcon
 
TObjectPtr< UWidgetAnimation > PingPong
 
TObjectPtr< UMaterialInstanceDynamic > GaugeMaterial
 
- UUserWidgetBase(으)로부터 상속된 Protected 속성
EWidgetState WidgetState
 
TObjectPtr< UAbilitySystemComponent > ASC
 
FGameplayTag LayerTag
 
bool bPrimary = false
 
TObjectPtr< UWidgetAnimation > AppearanceAnim
 
TObjectPtr< UWidgetAnimation > DisappearanceAnim
 

Private 속성

FDelegateHandle CooldownTagDelegateHandle
 
FTimerHandle CooldownUpdateTimerHandle
 
bool bCooldownActive = false
 

멤버 함수 문서화

◆ BindCooldownTagEvent()

void USkillSlotWidget::BindCooldownTagEvent ( )
protected
60{
61 if (bUseCooldownGauge == false || ASC == nullptr || CooldownTargetAbilityTag.IsValid() == false)
62 {
63 return;
64 }
65
66 auto& CountChanged = ASC->RegisterGameplayTagEvent(CooldownTargetAbilityTag, EGameplayTagEventType::NewOrRemoved);
67 CooldownTagDelegateHandle = CountChanged.AddUObject(this, &ThisClass::OnCooldownTagChanged);
68 bCooldownActive = ASC->HasMatchingGameplayTag(CooldownTargetAbilityTag);
69
71
72 if (bCooldownActive == false)
73 {
74 return;
75 }
76
78}
void StartCooldownUpdateTimer()
Definition SkillSlotWidget.cpp:141
FDelegateHandle CooldownTagDelegateHandle
Definition SkillSlotWidget.h:159
FGameplayTag CooldownTargetAbilityTag
Definition SkillSlotWidget.h:95
bool bUseCooldownGauge
Definition SkillSlotWidget.h:86
bool bCooldownActive
Definition SkillSlotWidget.h:161
void UpdateCooldownProgress()
Definition SkillSlotWidget.cpp:169
TObjectPtr< UAbilitySystemComponent > ASC
Definition UserWidgetBase.h:123
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ GetInputIcon()

FORCEINLINE EInputIconType USkillSlotWidget::GetInputIcon ( ) const
inline
43 {
44 return InputIcon;
45 }
EInputIconType InputIcon
Definition SkillSlotWidget.h:102

◆ GetKeyboardKeyText()

FORCEINLINE const FText & USkillSlotWidget::GetKeyboardKeyText ( ) const
inline
48 {
49 return KeyboardKeyText;
50 }
FText KeyboardKeyText
Definition SkillSlotWidget.h:105

◆ GetMouseButton()

FORCEINLINE EMouseButtonType USkillSlotWidget::GetMouseButton ( ) const
inline
53 {
54 return MouseButton;
55 }
EMouseButtonType MouseButton
Definition SkillSlotWidget.h:108

◆ NativeConstruct()

void USkillSlotWidget::NativeConstruct ( )
overrideprotectedvirtual
25{
26 Super::NativeConstruct();
28
29 if (IsValid(GaugeIcon))
30 {
31 GaugeIcon->SetVisibility(bUseCooldownGauge ? ESlateVisibility::HitTestInvisible : ESlateVisibility::Collapsed);
32 }
33
34 if (bUseCooldownGauge == false)
35 {
36 return;
37 }
38
39 if (IsValid(GaugeIcon) == false)
40 {
41 LOG_ERROR(LogCK, "GaugeIcon이 설정되어있지 않습니다. ");
42 GaugeMaterial = nullptr;
43 return;
44 }
45
46 GaugeIcon->SetBrush(GaugeBrush);
47 GaugeMaterial = GaugeIcon->GetDynamicMaterial();
49}
#define LOG_ERROR(Category, Format,...)
Definition CK_UE.h:40
TObjectPtr< UMaterialInstanceDynamic > GaugeMaterial
Definition SkillSlotWidget.h:156
TObjectPtr< UImage > GaugeIcon
Definition SkillSlotWidget.h:124
FSlateBrush GaugeBrush
Definition SkillSlotWidget.h:117
virtual void OnSlotRefreshed()
Definition SkillSlotWidget.cpp:280
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ NativeDestruct()

void USkillSlotWidget::NativeDestruct ( )
overrideprotectedvirtual
53{
55 Super::NativeDestruct();
56}
void UnbindCooldownTagEvent()
Definition SkillSlotWidget.cpp:81
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ NativePreConstruct()

void USkillSlotWidget::NativePreConstruct ( )
overrideprotectedvirtual
264{
265 Super::NativePreConstruct();
266 this->OnSlotRefreshed();
267}
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ OnCooldownCompleted()

void USkillSlotWidget::OnCooldownCompleted ( )
protected
116{
117 bCooldownActive = false;
120
121 if (SkillIcon)
122 {
123 SkillIcon->SetOpacity(1.0f);
124 }
125
126 if (!IsValid(PingPong))
127 {
128 LOG_ERROR(LogCK, "%s 에 문제가 있어 재생할 수 없습니다. ", NAMEOF(UWidgetAnimation));
129 return;
130 }
131
132 if (IsAnimationPlaying(PingPong))
133 {
134 StopAnimation(PingPong);
135 }
136
137 PlayAnimation(PingPong);
138}
#define NAMEOF(Type)
Definition CK_UE.h:30
TObjectPtr< UWidgetAnimation > PingPong
Definition SkillSlotWidget.h:152
void StopCooldownUpdateTimer()
Definition SkillSlotWidget.cpp:155
void SetCooldownProgress(float InProgress)
Definition SkillSlotWidget.cpp:216
TObjectPtr< UImage > SkillIcon
Definition SkillSlotWidget.h:121
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ OnCooldownStarted()

void USkillSlotWidget::OnCooldownStarted ( )
protected
102{
103 bCooldownActive = true;
104
105 if (SkillIcon)
106 {
108 }
109
112}
float SkillIconCooldownOpacity
Definition SkillSlotWidget.h:92
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ OnCooldownTagChanged()

void USkillSlotWidget::OnCooldownTagChanged ( const FGameplayTag  Tag,
int32  NewCount 
)
protected
247{
248 if (NewCount > 0)
249 {
251 return;
252 }
253
254 if (bCooldownActive == false)
255 {
256 return;
257 }
258
260}
void OnCooldownStarted()
Definition SkillSlotWidget.cpp:101
void OnCooldownCompleted()
Definition SkillSlotWidget.cpp:115
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ OnSlotRefreshed()

void USkillSlotWidget::OnSlotRefreshed ( )
protectedvirtual
281{
282 switch (InputIcon)
283 {
285 {
286 if (MouseButtonIcon)
287 {
288 MouseButtonIcon->SetVisibility(ESlateVisibility::Collapsed);
289 }
290
291 if (KeyboardKeyIcon)
292 {
293 KeyboardKeyIcon->SetVisibility(ESlateVisibility::Visible);
294 }
295
296 if (KeyText)
297 {
298 KeyText->SetText(KeyboardKeyText);
299 }
300
301 if (SkillIcon)
302 {
303 SkillIcon->SetBrush(IconBrush);
304 }
305
306 if (KeyBoxImage)
307 {
308 KeyBoxImage->SetBrush(KeyBoxImageBrush);
309 }
310
311 if (GaugeIcon)
312 {
313 GaugeIcon->SetBrush(GaugeBrush);
314 GaugeIcon->SetVisibility(bUseCooldownGauge ? ESlateVisibility::Visible : ESlateVisibility::Collapsed);
315 }
316
317 break;
318 }
319
321 {
322 if (KeyboardKeyIcon)
323 {
324 KeyboardKeyIcon->SetVisibility(ESlateVisibility::Collapsed);
325 }
326
327 if (MouseButtonIcon)
328 {
329 MouseButtonIcon->SetVisibility(ESlateVisibility::Visible);
330 }
331
333 {
334 MouseLeftIcon->SetVisibility(static_cast<ESlateVisibility>(static_cast<uint8>(MouseButton)));
335 MouseRightIcon->SetVisibility(static_cast<ESlateVisibility>(static_cast<uint8>(MouseButton) ^ 1));
336 }
337
338 if (SkillIcon)
339 {
340 SkillIcon->SetBrush(IconBrush);
341 }
342
343 if (GaugeIcon)
344 {
345 GaugeIcon->SetBrush(GaugeBrush);
346 GaugeIcon->SetVisibility(bUseCooldownGauge ? ESlateVisibility::Visible : ESlateVisibility::Collapsed);
347 }
348
349 break;
350 }
351
353 {
354 if (KeyboardKeyIcon)
355 {
356 KeyboardKeyIcon->SetVisibility(ESlateVisibility::Collapsed);
357 }
358
359 if (MouseButtonIcon)
360 {
361 MouseButtonIcon->SetVisibility(ESlateVisibility::Collapsed);
362 }
363
364 if (SkillIcon)
365 {
366 SkillIcon->SetBrush(FSlateBrush());
367 }
368
369 if (KeyBoxImage)
370 {
371 KeyBoxImage->SetBrush(FSlateBrush());
372 }
373
374 if (GaugeIcon)
375 {
376 GaugeIcon->SetBrush(FSlateBrush());
377 GaugeIcon->SetVisibility(ESlateVisibility::Collapsed);
378 }
379
380 break;
381 }
382 }
383}
TObjectPtr< UImage > MouseRightIcon
Definition SkillSlotWidget.h:134
TObjectPtr< UTextBlock > KeyText
Definition SkillSlotWidget.h:142
FSlateBrush IconBrush
Definition SkillSlotWidget.h:114
TObjectPtr< UImage > KeyBoxImage
Definition SkillSlotWidget.h:145
TObjectPtr< UOverlay > KeyboardKeyIcon
Definition SkillSlotWidget.h:148
TObjectPtr< UOverlay > MouseButtonIcon
Definition SkillSlotWidget.h:137
FSlateBrush KeyBoxImageBrush
Definition SkillSlotWidget.h:111
TObjectPtr< UImage > MouseLeftIcon
Definition SkillSlotWidget.h:131
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ SetAbilitySystemComponent()

void USkillSlotWidget::SetAbilitySystemComponent ( AActor *  InOwner)
overridevirtual

UUserWidgetBase(으)로부터 재구현되었습니다.

17{
19 Super::SetAbilitySystemComponent(InOwner);
21}
void BindCooldownTagEvent()
Definition SkillSlotWidget.cpp:59
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ SetCooldownProgress()

void USkillSlotWidget::SetCooldownProgress ( float  InProgress)
protected
217{
218 if (bUseCooldownGauge == false)
219 {
220 return;
221 }
222
223 if (GaugeMaterial == nullptr && IsValid(GaugeIcon))
224 {
225 GaugeIcon->SetBrush(GaugeBrush);
226 GaugeMaterial = GaugeIcon->GetDynamicMaterial();
227 }
228
229 if (ProgressParameterName.IsNone())
230 {
231 LOG_ERROR(LogCK, "`ProgressParameterName` 를 찾을 수 없습니다. ");
232 return;
233 }
234
235 if (GaugeMaterial)
236 {
237 GaugeMaterial->SetScalarParameterValue(ProgressParameterName, FMath::Clamp(InProgress, 0.0f, 1.0f));
238 }
239 else
240 {
241 LOG_ERROR(LogCK, "%s를 찾지 못했습니다. ", NAMEOF(UMaterialInstanceDynamic));
242 }
243}
FName ProgressParameterName
Definition SkillSlotWidget.h:98
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ StartCooldownUpdateTimer()

void USkillSlotWidget::StartCooldownUpdateTimer ( )
protected
142{
143 if (IsValid(ReadyGlowImage))
144 {
145 ReadyGlowImage->SetVisibility(ESlateVisibility::Collapsed);
146 }
147
148 UWorld* World = GetWorld();
149 checkf(World, TEXT("%s를 얻어올 수 없습니다. "), NAMEOF(UWorld));
150 FTimerManager& TimerManager = World->GetTimerManager();
151 TimerManager.SetTimer(CooldownUpdateTimerHandle, this, &ThisClass::UpdateCooldownProgress, 0.05f, true);
152}
TObjectPtr< UImage > ReadyGlowImage
Definition SkillSlotWidget.h:127
FTimerHandle CooldownUpdateTimerHandle
Definition SkillSlotWidget.h:160
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ StopCooldownUpdateTimer()

void USkillSlotWidget::StopCooldownUpdateTimer ( )
protected
156{
157 if (IsValid(ReadyGlowImage))
158 {
159 ReadyGlowImage->SetVisibility(ESlateVisibility::Visible);
160 }
161
162 UWorld* World = GetWorld();
163 checkf(World, TEXT("%s를 얻어올 수 없습니다. "), NAMEOF(UWorld));
164 FTimerManager& TimerManager = World->GetTimerManager();
165 TimerManager.ClearTimer(CooldownUpdateTimerHandle);
166}
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ UnbindCooldownTagEvent()

void USkillSlotWidget::UnbindCooldownTagEvent ( )
protected
82{
84
85 if (IsValid(PingPong))
86 {
87 StopAnimation(PingPong);
88 }
89
90 if (ASC && CooldownTargetAbilityTag.IsValid() && CooldownTagDelegateHandle.IsValid())
91 {
92 auto& CountChanged = ASC->RegisterGameplayTagEvent(CooldownTargetAbilityTag, EGameplayTagEventType::NewOrRemoved);
93 CountChanged.Remove(CooldownTagDelegateHandle);
94 }
95
96 bCooldownActive = false;
98}
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ UpdateCooldownProgress()

void USkillSlotWidget::UpdateCooldownProgress ( )
protected
170{
171 if (bUseCooldownGauge == false || bCooldownActive == false)
172 {
174 return;
175 }
176
177 check(ASC);
178
179 if (CooldownTargetAbilityTag.IsValid() == false)
180 {
181 LOG_ERROR(LogCK, "지정된 %s를 찾을 수 없어 동작할 수 없습니다. ", NAMEOF(FGameplayTag));
183 return;
184 }
185
186 FGameplayTagContainer CooldownTags;
187 CooldownTags.AddTag(CooldownTargetAbilityTag);
188
189 const FGameplayEffectQuery Query = FGameplayEffectQuery::MakeQuery_MatchAllOwningTags(CooldownTags);
190 const TArray<TPair<float, float>> CooldownTimes = ASC->GetActiveEffectsTimeRemainingAndDuration(Query);
191
192 if (CooldownTimes.IsEmpty())
193 {
195 return;
196 }
197
198 float Progress = 0.0f;
199
200 for (const TPair<float, float>& CooldownTime : CooldownTimes)
201 {
202 Progress = CooldownTime.Value > KINDA_SMALL_NUMBER ? FMath::Max(Progress, CooldownTime.Key / CooldownTime.Value) : Progress;
203 }
204
206 {
207 SetCooldownProgress(Progress);
208 }
209 else
210 {
211 SetCooldownProgress(1.0f - Progress);
212 }
213}
bool bReverseGaugeFillDirection
Definition SkillSlotWidget.h:89
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

멤버 데이터 문서화

◆ bCooldownActive

bool USkillSlotWidget::bCooldownActive = false
private

◆ bReverseGaugeFillDirection

bool USkillSlotWidget::bReverseGaugeFillDirection = false
protected

◆ bUseCooldownGauge

bool USkillSlotWidget::bUseCooldownGauge = false
protected

◆ CooldownTagDelegateHandle

FDelegateHandle USkillSlotWidget::CooldownTagDelegateHandle
private

◆ CooldownTargetAbilityTag

FGameplayTag USkillSlotWidget::CooldownTargetAbilityTag = FGameplayTag::EmptyTag
protected

◆ CooldownUpdateTimerHandle

FTimerHandle USkillSlotWidget::CooldownUpdateTimerHandle
private

◆ GaugeBrush

FSlateBrush USkillSlotWidget::GaugeBrush
protected

◆ GaugeIcon

TObjectPtr<UImage> USkillSlotWidget::GaugeIcon
protected

◆ GaugeMaterial

TObjectPtr<UMaterialInstanceDynamic> USkillSlotWidget::GaugeMaterial
protected

◆ IconBrush

FSlateBrush USkillSlotWidget::IconBrush
protected

◆ InputIcon

EInputIconType USkillSlotWidget::InputIcon
protected

◆ KeyboardKeyIcon

TObjectPtr<UOverlay> USkillSlotWidget::KeyboardKeyIcon
protected

◆ KeyboardKeyText

FText USkillSlotWidget::KeyboardKeyText
protected

◆ KeyBoxImage

TObjectPtr<UImage> USkillSlotWidget::KeyBoxImage
protected

◆ KeyBoxImageBrush

FSlateBrush USkillSlotWidget::KeyBoxImageBrush
protected

◆ KeyText

TObjectPtr<UTextBlock> USkillSlotWidget::KeyText
protected

◆ MouseButton

EMouseButtonType USkillSlotWidget::MouseButton
protected

◆ MouseButtonIcon

TObjectPtr<UOverlay> USkillSlotWidget::MouseButtonIcon
protected

◆ MouseLeftIcon

TObjectPtr<UImage> USkillSlotWidget::MouseLeftIcon
protected

◆ MouseRightIcon

TObjectPtr<UImage> USkillSlotWidget::MouseRightIcon
protected

◆ PingPong

TObjectPtr<UWidgetAnimation> USkillSlotWidget::PingPong
protected

◆ ProgressParameterName

FName USkillSlotWidget::ProgressParameterName = TEXT("Progress")
protected

◆ ReadyGlowImage

TObjectPtr<UImage> USkillSlotWidget::ReadyGlowImage
protected

◆ SkillIcon

TObjectPtr<UImage> USkillSlotWidget::SkillIcon
protected

◆ SkillIconCooldownOpacity

float USkillSlotWidget::SkillIconCooldownOpacity = 0.37f
protected

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