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

#include <UHoverButton.h>

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

Public 멤버 함수

void SetButtonEnabled (bool bInEnabled)
 

Public 속성

int32 FontOutlineSize = 0
 
int32 FontSize = 48
 
FLinearColor HoverButtonColor = FLinearColor(0.2f, 0.2f, 0.2f)
 
FLinearColor HoverTextColor = FLinearColor(0.8f, 0.9f, 1.f)
 
FText LabelText = FText::FromString("Button")
 
FLinearColor NormalButtonColor = FLinearColor(0.1f, 0.1f, 0.1f)
 
FLinearColor NormalTextColor = FLinearColor::White
 
FOnHoverButtonClickedEvent OnButtonClickedEvent
 
FLinearColor PressButtonColor = FLinearColor(0.05f, 0.05f, 0.05f)
 
FLinearColor PressTextColor = FLinearColor(0.6f, 0.7f, 1.f)
 

Protected 멤버 함수

virtual void NativeConstruct () override
 
virtual void NativePreConstruct () override
 
virtual void NativeTick (const FGeometry &MyGeometry, float InDeltaTime) override
 

Private 멤버 함수

void ApplyStyle ()
 
void HandleClicked ()
 
void HandleHovered ()
 
void HandlePressed ()
 
void HandleReleased ()
 
void HandleUnhovered ()
 

Private 속성

bool bEnabled = true
 
class UBorder * Border_BG
 
class UButton * Button_Main
 
float CurrentBrightness = 1.0f
 
FVector2D CurrentScale = FVector2D(1.f, 1.f)
 
float LerpSpeed = 20.f
 
float TargetBrightness = 1.f
 
FVector2D TargetScale = FVector2D(1.f, 1.f)
 
class UTextBlock * Text_Label
 

상세한 설명

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

멤버 함수 문서화

◆ ApplyStyle()

void UHoverButton::ApplyStyle ( )
private

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

29{
30 if (!Text_Label)
31 return;
32
33 // 텍스트 반영
34 Text_Label->SetText(LabelText);
35
36 // 폰트 크기 반영
37 FSlateFontInfo NewFont = Text_Label->GetFont();
38 NewFont.OutlineSettings.OutlineSize = FontOutlineSize; // 원하는 외곽선 두께
39 NewFont.Size = FontSize;
40 Text_Label->SetFont(NewFont);
41
42 // Normal 상태 기본 세팅
43 Text_Label->SetColorAndOpacity(NormalTextColor);
44 Border_BG->SetBrushColor(NormalButtonColor);
45}
int32 FontOutlineSize
class UBorder * Border_BG
class UTextBlock * Text_Label
FLinearColor NormalTextColor
FLinearColor NormalButtonColor

다음을 참조함 : Border_BG, FontOutlineSize, FontSize, LabelText, NormalButtonColor, NormalTextColor, Text_Label.

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

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

◆ HandleClicked()

void UHoverButton::HandleClicked ( )
private

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

100{
101 if (!bEnabled)
102 return;
103
104 OnButtonClickedEvent.Broadcast();
105}
FOnHoverButtonClickedEvent OnButtonClickedEvent

다음을 참조함 : bEnabled, OnButtonClickedEvent.

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

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

◆ HandleHovered()

void UHoverButton::HandleHovered ( )
private

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

57{
58 if (!bEnabled)
59 return;
60
61 TargetScale = FVector2D(1.06f, 1.06f); // Hover 확대
62 TargetBrightness = 1.15f;
63 Text_Label->SetColorAndOpacity(HoverTextColor);
64 Border_BG->SetBrushColor(HoverButtonColor);
65}
FLinearColor HoverTextColor
FVector2D TargetScale
float TargetBrightness
FLinearColor HoverButtonColor

다음을 참조함 : bEnabled, Border_BG, HoverButtonColor, HoverTextColor, TargetBrightness, TargetScale, Text_Label.

다음에 의해서 참조됨 : HandleReleased(), NativeConstruct().

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

◆ HandlePressed()

void UHoverButton::HandlePressed ( )
private

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

79{
80 if (!bEnabled)
81 return;
82
83 TargetScale = FVector2D(0.97f, 0.97f); // 눌리는 효과
84 Text_Label->SetColorAndOpacity(PressTextColor);
85 Border_BG->SetBrushColor(PressButtonColor);
86}
FLinearColor PressButtonColor
FLinearColor PressTextColor

다음을 참조함 : bEnabled, Border_BG, PressButtonColor, PressTextColor, TargetScale, Text_Label.

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

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

◆ HandleReleased()

void UHoverButton::HandleReleased ( )
private

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

89{
90 if (!bEnabled)
91 return;
92
93 if (Button_Main->IsHovered())
95 else
97}
void HandleUnhovered()
class UButton * Button_Main
void HandleHovered()

다음을 참조함 : bEnabled, Button_Main, HandleHovered(), HandleUnhovered().

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

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

◆ HandleUnhovered()

void UHoverButton::HandleUnhovered ( )
private

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

68{
69 if (!bEnabled)
70 return;
71
72 TargetScale = FVector2D(1.0f, 1.0f);
73 TargetBrightness = 1.0f;
74 Text_Label->SetColorAndOpacity(NormalTextColor);
75 Border_BG->SetBrushColor(NormalButtonColor);
76}

다음을 참조함 : bEnabled, Border_BG, NormalButtonColor, NormalTextColor, TargetBrightness, TargetScale, Text_Label.

다음에 의해서 참조됨 : HandleReleased(), NativeConstruct().

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

◆ NativeConstruct()

void UHoverButton::NativeConstruct ( )
overrideprotectedvirtual

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

15{
16 Super::NativeConstruct();
17
18 if (Button_Main)
19 {
20 Button_Main->OnHovered.AddDynamic(this, &UHoverButton::HandleHovered);
21 Button_Main->OnUnhovered.AddDynamic(this, &UHoverButton::HandleUnhovered);
22 Button_Main->OnPressed.AddDynamic(this, &UHoverButton::HandlePressed);
23 Button_Main->OnReleased.AddDynamic(this, &UHoverButton::HandleReleased);
24 Button_Main->OnClicked.AddDynamic(this, &UHoverButton::HandleClicked);
25 }
26}
void HandleReleased()
void HandlePressed()
void HandleClicked()

다음을 참조함 : Button_Main, HandleClicked(), HandleHovered(), HandlePressed(), HandleReleased(), HandleUnhovered().

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

◆ NativePreConstruct()

void UHoverButton::NativePreConstruct ( )
overrideprotectedvirtual

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

9{
10 Super::NativePreConstruct();
11 ApplyStyle();
12}

다음을 참조함 : ApplyStyle().

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

◆ NativeTick()

void UHoverButton::NativeTick ( const FGeometry &  MyGeometry,
float  InDeltaTime 
)
overrideprotectedvirtual

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

48{
49 Super::NativeTick(MyGeometry, InDeltaTime);
50
51 // 스케일 보간
52 CurrentScale = FMath::Vector2DInterpTo(CurrentScale, TargetScale, InDeltaTime, LerpSpeed);
53 SetRenderScale(CurrentScale);
54}
FVector2D CurrentScale

다음을 참조함 : CurrentScale, LerpSpeed, TargetScale.

◆ SetButtonEnabled()

void UHoverButton::SetButtonEnabled ( bool  bInEnabled)

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

108{
109 bEnabled = bInEnabled;
110
111 Button_Main->SetIsEnabled(bInEnabled);
112
113 if (bInEnabled)
114 {
115 TargetScale = FVector2D(1.f, 1.f);
116 TargetBrightness = 1.f;
117
118 // 상태가 다시 Normal이므로 색 복구
119 Border_BG->SetBrushColor(NormalButtonColor);
120 Text_Label->SetColorAndOpacity(NormalTextColor);
121 }
122 else
123 {
124 TargetScale = FVector2D(1.f, 1.f);
125 TargetBrightness = 0.4f; // Disable 톤 다운
126
127 // 비활성화 시 조금 어둡게
128 Border_BG->SetBrushColor(NormalButtonColor * 0.5f);
129 Text_Label->SetColorAndOpacity(NormalTextColor * 0.5f);
130 }
131}

다음을 참조함 : bEnabled, Border_BG, Button_Main, NormalButtonColor, NormalTextColor, TargetBrightness, TargetScale, Text_Label.

멤버 데이터 문서화

◆ bEnabled

bool UHoverButton::bEnabled = true
private

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

다음에 의해서 참조됨 : HandleClicked(), HandleHovered(), HandlePressed(), HandleReleased(), HandleUnhovered(), SetButtonEnabled().

◆ Border_BG

class UBorder* UHoverButton::Border_BG
private

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

다음에 의해서 참조됨 : ApplyStyle(), HandleHovered(), HandlePressed(), HandleUnhovered(), SetButtonEnabled().

◆ Button_Main

class UButton* UHoverButton::Button_Main
private

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

다음에 의해서 참조됨 : HandleReleased(), NativeConstruct(), SetButtonEnabled().

◆ CurrentBrightness

float UHoverButton::CurrentBrightness = 1.0f
private

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

◆ CurrentScale

FVector2D UHoverButton::CurrentScale = FVector2D(1.f, 1.f)
private

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

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

◆ FontOutlineSize

int32 UHoverButton::FontOutlineSize = 0

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

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

◆ FontSize

int32 UHoverButton::FontSize = 48

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

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

◆ HoverButtonColor

FLinearColor UHoverButton::HoverButtonColor = FLinearColor(0.2f, 0.2f, 0.2f)

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

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

◆ HoverTextColor

FLinearColor UHoverButton::HoverTextColor = FLinearColor(0.8f, 0.9f, 1.f)

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

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

◆ LabelText

FText UHoverButton::LabelText = FText::FromString("Button")

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

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

◆ LerpSpeed

float UHoverButton::LerpSpeed = 20.f
private

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

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

◆ NormalButtonColor

FLinearColor UHoverButton::NormalButtonColor = FLinearColor(0.1f, 0.1f, 0.1f)

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

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

◆ NormalTextColor

FLinearColor UHoverButton::NormalTextColor = FLinearColor::White

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

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

◆ OnButtonClickedEvent

FOnHoverButtonClickedEvent UHoverButton::OnButtonClickedEvent

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

다음에 의해서 참조됨 : HandleClicked(), ULobbyWidget::NativeConstruct(), USessionInfoWidget::NativeConstruct(), UStartWidget::NativeConstruct().

◆ PressButtonColor

FLinearColor UHoverButton::PressButtonColor = FLinearColor(0.05f, 0.05f, 0.05f)

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

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

◆ PressTextColor

FLinearColor UHoverButton::PressTextColor = FLinearColor(0.6f, 0.7f, 1.f)

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

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

◆ TargetBrightness

float UHoverButton::TargetBrightness = 1.f
private

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

다음에 의해서 참조됨 : HandleHovered(), HandleUnhovered(), SetButtonEnabled().

◆ TargetScale

FVector2D UHoverButton::TargetScale = FVector2D(1.f, 1.f)
private

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

다음에 의해서 참조됨 : HandleHovered(), HandlePressed(), HandleUnhovered(), NativeTick(), SetButtonEnabled().

◆ Text_Label

class UTextBlock* UHoverButton::Text_Label
private

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

다음에 의해서 참조됨 : ApplyStyle(), HandleHovered(), HandlePressed(), HandleUnhovered(), SetButtonEnabled().


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