KLingo Project Documentation 1.0.0
Unreal Engine 5.6 C++ Project Documentation
로딩중...
검색중...
일치하는것 없음
UDailyKioskWidget.cpp
이 파일의 문서화 페이지로 가기
1// Copyright (c) 2025 Doppleddiggong. All rights reserved. Unauthorized copying, modification, or distribution of this file, via any medium is strictly prohibited. Proprietary and confidential.
2
3#include "UDailyKioskWidget.h"
4#include "UConfigLibrary.h"
5#include "ULingoGameHelper.h"
6#include "GameLogging.h"
7#include "Components/TextBlock.h"
8
10{
11 Super::NativeConstruct();
12
13 // Best Score 로드 및 표시
15}
16
18{
19 // 플레이어 UserID 가져오기
20 const int32 UserId = ULingoGameHelper::GetUserId(this);
21
22 // ConfigLibrary에서 Daily Best Score 읽기
23 const int32 BestScore = UConfigLibrary::GetUserInt(UserId, TEXT("DailyBestScore"), 0);
24
25 // TextBlock에 표시
26 if (Txt_BestScore)
27 {
28 FString ScoreText = FString::Printf(TEXT("Daily Best: %d"), BestScore);
29 Txt_BestScore->SetText(FText::FromString(ScoreText));
30
31 PRINTLOG(TEXT("[DailyKioskWidget] User %d - Best Score: %d"), UserId, BestScore);
32 }
33 else
34 {
35 PRINTLOG(TEXT("[DailyKioskWidget] ERROR: Txt_BestScore is null!"));
36 }
37}
YiSan 전반에서 사용하는 공용 인터페이스를 선언합니다.
#define PRINTLOG(fmt,...)
Definition GameLogging.h:30
GConfig 래퍼 설정 관리 시스템
static int32 GetUserInt(int32 UserId, const FString &Key, int32 DefaultValue=0)
유저별 정수 설정 읽기
TObjectPtr< class UTextBlock > Txt_BestScore
Best Score 표시 텍스트 (Blueprint에서 바인딩)
virtual void NativeConstruct() override
void UpdateBestScore()
Daily Best Score를 로드하고 UI에 표시
static int32 GetUserId(const UObject *WorldContextObject)