Fix: some bugs

This commit is contained in:
2018-06-02 17:17:18 +09:00
parent b91986393b
commit 73bdb38c56
3 changed files with 31 additions and 16 deletions
+6 -4
View File
@@ -47,7 +47,7 @@ class MenuApp {
// console.log(replyJSON);
let mouseAppCount = self.getAppCount(replyJSON, AppButton.TYPE_MOUSE);
let typingAppCount = self.getAppCount(replyJSON, AppButton.TYPE_TYPING);
let typingPracticeAppCount = self.getAppCount(replyJSON, AppButton.TYPE_TYPING);
let startX = game.world.width / 2 - (150 * mouseAppCount / 2) - (150 / 2);
let mouseAppIndex = 0;
@@ -55,7 +55,8 @@ class MenuApp {
let activeApp = replyJSON[i];
if(self.isMouseApp(activeApp)) {
mouseAppIndex++;
new AppButton(startX + 150 * mouseAppIndex, 300, AppButton.TYPE_MOUSE, activeApp.AppName,
new AppButton(startX + 150 * mouseAppIndex, 300, AppButton.TYPE_MOUSE,
activeApp.AppName, AppButton.NONE_BUTTON_TEXT,
() => {
sessionStorageManager.playingAppID = activeApp.AppID;
sessionStorageManager.playingAppName = activeApp.AppName;
@@ -65,8 +66,9 @@ class MenuApp {
}
}
if(typingAppCount > 0) {
new AppButton(game.world.width / 2, 500, AppButton.TYPE_TYPING, "icon_fullscreen",
if(typingPracticeAppCount > 0) {
new AppButton(game.world.width / 2, 500, AppButton.TYPE_TYPING,
"icon_fullscreen", "타자 연습\n(임시)",
() => {
location.href = '../../web/client/menu_typing_practice.html';
}