KLingo Project Documentation 1.0.0
Unreal Engine 5.6 C++ Project Documentation
로딩중...
검색중...
일치하는것 없음
APopupTesterActor.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
4#include "APopupTesterActor.h"
5
6#include "EPopupType.h"
7#include "UDialogManager.h"
8#include "UPopupManager.h"
9#include "UPopup_MsgBox.h"
10
11#include "GameLogging.h"
12#include "ULingoGameHelper.h"
13#include "UPopup_InputMsg.h"
14#include "UPopup_ReadQuest.h"
15#include "UPopup_Interview.h"
16#include "NetworkData.h"
17#include "Popup_Result.h"
19#include "UPopup_DailyStudy.h"
20#include "UPopup_Evaluation.h"
22#include "UPopup_LevelSelect.h"
23#include "UPopup_History.h"
24
25
27{
28 PrimaryActorTick.bCanEverTick = false;
29}
30
35
37{
38 UDialogManager::Get(GetWorld())->ShowToast(TEXT("토스트 메세지 샘플"));
39}
40
42{
43 UPopupManager::Get(GetWorld())->ShowMsgBox(TEXT("알림"), TEXT("OK_CANCEL 설명문"),
45 FOnMsgBoxOkDelegate::CreateUObject(this, &APopupTesterActor::OnOK),
46 FOnMsgBoxCancelDelegate::CreateUObject(this, &APopupTesterActor::OnCancel));
47}
48
50{
51 UPopupManager::Get(GetWorld())->ShowMsgBox(TEXT("알림"), TEXT("OK 설명문"),
53 FOnMsgBoxOkDelegate::CreateUObject(this, &APopupTesterActor::OnOK));
54}
55
57{
58 if (auto Popup = UPopupManager::ShowPopupAs<UPopup_InputMsg>(GetWorld(), EPopupType::Login))
59 {
60 Popup->InitPopup(EPopupType::Login);
61 }
62}
63
65{
66 if (auto Popup = UPopupManager::ShowPopupAs<UPopup_ReadQuest>(GetWorld(), EPopupType::ReadQuest))
67 {
68 Popup->InitRead(ULingoGameHelper::GetLingoGameState(GetWorld())->ReadScenarioData);
69 }
70}
71
73{
74 if (auto Popup = UPopupManager::ShowPopupAs<UPopup_InterviewHello>(GetWorld(), EPopupType::InterviewHello))
75 {
76 // 테스트용 더미 데이터 생성
78
79 // 질문 1
81 Q1.Id = 1;
82 Q1.TypeCode = 0;
83 Q1.Eng = TEXT("What is your current country of residence?");
84 Q1.Kor = TEXT("현재 거주 국가는 어디인가요?");
85 Q1.EngKey = TEXT("country");
86 Q1.KorKey = TEXT("국가");
87 Q1.CreatedAt = TEXT("2025-01-15");
88 TestData.Questions.Add(Q1);
89
90 // 질문 2
92 Q2.Id = 2;
93 Q2.TypeCode = 0;
94 Q2.Eng = TEXT("How did you find out about this program?");
95 Q2.Kor = TEXT("이 프로그램을 어떻게 알게 되었나요?");
96 Q2.EngKey = TEXT("discovery");
97 Q2.KorKey = TEXT("발견경로");
98 Q2.CreatedAt = TEXT("2025-01-15");
99 TestData.Questions.Add(Q2);
100
101 // 질문 3
103 Q3.Id = 3;
104 Q3.TypeCode = 0;
105 Q3.Eng = TEXT("What are your goals for learning Korean?");
106 Q3.Kor = TEXT("한국어 학습의 목표는 무엇인가요?");
107 Q3.EngKey = TEXT("goals");
108 Q3.KorKey = TEXT("목표");
109 Q3.CreatedAt = TEXT("2025-01-15");
110 TestData.Questions.Add(Q3);
111
112 // 팝업 초기화
113 Popup->InitPopup(TestData);
114
115 PRINTLOG(TEXT("[PopupTester] Interview popup opened with %d questions"), TestData.Questions.Num());
116 }
117}
118
120{
121 // 테스트 데이터 생성
123
124 // Total Result 설정
125 TestData.total_result.final_score = 62;
126 TestData.total_result.grade = TEXT("D");
127 TestData.total_result.feedback_summary = TEXT("Your strengths lie in Reading and Listening, but there is a need for significant improvement in Speaking. How can you enhance your speaking skills to better articulate your thoughts?");
128
129 // Scenario Results 설정
130 FScenarioResult ReadingResult;
131 ReadingResult.scenario_type = EScenarioType::READING;
132 ReadingResult.display_name = TEXT("읽기 영역");
133 ReadingResult.final_score = 93;
134 ReadingResult.grade = TEXT("A");
135 ReadingResult.feedback_summary.title = TEXT("Excellent Reading Skills");
136 ReadingResult.feedback_summary.message = TEXT("Your reading comprehension is outstanding, demonstrating a strong grasp of the material.");
137 ReadingResult.action_item = TEXT("Continue practicing by reading a variety of texts to maintain your high level of comprehension.");
138 TestData.scenario_results.Add(ReadingResult);
139
140 FScenarioResult ListeningResult;
141 ListeningResult.scenario_type = EScenarioType::LISTENING;
142 ListeningResult.display_name = TEXT("듣기 영역");
143 ListeningResult.final_score = 79;
144 ListeningResult.grade = TEXT("C");
145 ListeningResult.feedback_summary.title = TEXT("Good Listening Skills");
146 ListeningResult.feedback_summary.message = TEXT("You have a good ability to understand spoken English, but there is room for improvement in capturing finer details.");
147 ListeningResult.action_item = TEXT("Listen to English podcasts or watch English shows to improve your listening skills.");
148 TestData.scenario_results.Add(ListeningResult);
149
150 FScenarioResult WritingResult;
151 WritingResult.scenario_type = EScenarioType::WRITING;
152 WritingResult.display_name = TEXT("쓰기 영역");
153 WritingResult.final_score = 58;
154 WritingResult.grade = TEXT("D");
155 WritingResult.feedback_summary.title = TEXT("Writing Needs Improvement");
156 WritingResult.feedback_summary.message = TEXT("Your writing lacks clarity and coherence, which affects the overall quality of your work.");
157 WritingResult.action_item = TEXT("Practice writing short essays on various topics to improve structure and clarity.");
158 TestData.scenario_results.Add(WritingResult);
159
160 FScenarioResult SpeakingResult;
161 SpeakingResult.scenario_type = EScenarioType::SPEAKING;
162 SpeakingResult.display_name = TEXT("말하기 영역");
163 SpeakingResult.final_score = 58;
164 SpeakingResult.grade = TEXT("D");
165 SpeakingResult.feedback_summary.title = TEXT("Speaking Needs Improvement");
166 SpeakingResult.feedback_summary.message = TEXT("Your responses often lack relevance to the topic, affecting the flow and context of your speech.");
167 SpeakingResult.action_item = TEXT("Engage in speaking exercises, such as role-playing or conversation practice, to stay on topic and improve relevance.");
168 TestData.scenario_results.Add(SpeakingResult);
169
170 // 팝업 표시
171 if (auto Popup = UPopupManager::ShowPopupAs<UPopup_Evaluation>( GetWorld(), EPopupType::Evaluation))
172 Popup->InitPopup(TestData);
173}
174
176{
177 if (auto Popup = UPopupManager::ShowPopupAs<UPopup_LevelSelect>(GetWorld(), EPopupType::LevelSelect))
178 {
179 Popup->InitPopup();
180 PRINTLOG(TEXT("[PopupTester] Level Select popup opened"));
181 }
182}
183
185{
186 if (auto Popup = UPopupManager::ShowPopupAs<UPopup_History>(GetWorld(), EPopupType::History))
187 {
188 Popup->InitPopup();
189 PRINTLOG(TEXT("[PopupTester] Chat History popup opened"));
190 }
191}
192
194{
195 PRINT_STRING(TEXT("I'M OK"));
196}
197
199{
200 PRINT_STRING(TEXT("I'M Cancel"));
201}
202
203
YiSan 전반에서 사용하는 공용 인터페이스를 선언합니다.
#define PRINTLOG(fmt,...)
Definition GameLogging.h:30
#define PRINT_STRING(fmt,...)
Definition GameLogging.h:45
네트워크 요청과 응답에 사용되는 구조체 및 설정을 정의합니다.
UCommonFunctionLibrary 클래스를 선언합니다.
UDialogManager 클래스를 선언합니다.
Chat History를 표시하는 팝업 위젯입니다.
static FString GererateMD5(const FString &InText)
static class ALingoGameState * GetLingoGameState(const UObject *WorldContextObject)
Evaluation 결과 응답 구조체입니다.
TArray< FScenarioResult > scenario_results
TArray< FInterviewQuestionData > Questions
시나리오별 결과 구조체입니다.
FFeedbackSummary feedback_summary
EScenarioType scenario_type
FString feedback_summary