Fix: screen top ui, screen bottom ui

This commit is contained in:
2018-09-03 09:15:50 +09:00
parent ac46b61539
commit 8cf7f67ac6
24 changed files with 197 additions and 153 deletions
+11 -11
View File
@@ -15,8 +15,9 @@ class Start {
this.chart = new Chart();
// top
let backButton = new BackButton( () => {
// top ui
let screenTopUI = new ScreenTopUI();
screenTopUI.makeBackButton( () => {
if(isTypingPracticeStage())
location.href = '../../web/client/menu_typing_practice.html';
else if(isTypingTestStage())
@@ -26,8 +27,7 @@ class Start {
sessionStorageManager.resetPlayingAppData();
});
let fullscreenButton = new FullscreenButton(this.game);
screenTopUI.makeFullScreenButton();
// contents
@@ -42,11 +42,11 @@ class Start {
}
// bottom
let screenBottom = new ScreenBottom();
screenBottom.printBottomLeftText("오늘의 최고 기록 : ");
screenBottom.printBottomCenterText(sessionStorageManager.playingAppKoreanName);
screenBottom.printBottomRightText(sessionStorageManager.playerName);
// bottom ui
let screenBottomUI = new ScreenBottomUI();
screenBottomUI.printLeftText("오늘의 최고 기록 : ");
screenBottomUI.printCenterText(sessionStorageManager.playingAppKoreanName);
screenBottomUI.printRightText(sessionStorageManager.playerName);
this.dbConnectManager.requestTodayBestRecord(
sessionStorageManager.maestroID,
@@ -54,11 +54,11 @@ class Start {
sessionStorageManager.playingAppID,
replyJSON => {
sessionStorageManager.bestRecord = Number(replyJSON["BestRecord"]);
screenBottom.printBottomLeftTextWithBestRecord(sessionStorageManager.bestRecord);
screenBottomUI.printLeftTextWithBestRecord(sessionStorageManager.bestRecord);
},
replyJSON => { // no data
sessionStorageManager.bestRecord = 0;
screenBottom.printBottomLeftTextWithBestRecord(sessionStorageManager.bestRecord);
screenBottomUI.printLeftTextWithBestRecord(sessionStorageManager.bestRecord);
}
);
}