From edbd4743afba7d3f263c6ef7e46059f4b8d2f7cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8B=E1=85=A2=E1=84=91=E1=85=B3=E1=86=AF=20=E1=84=82?= =?UTF-8?q?=E1=85=A9=E1=84=90=E1=85=B3=E1=84=87=E1=85=AE=E1=86=A8?= Date: Wed, 12 Dec 2018 18:25:35 +0900 Subject: [PATCH] Fix: typing test menu - button icon bug --- src/game/lib/db_connect_manager.js | 21 +++++++++++++++++++++ src/game/menu/menu_typing_test.js | 4 ++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/src/game/lib/db_connect_manager.js b/src/game/lib/db_connect_manager.js index c7f1b93..2f865dc 100644 --- a/src/game/lib/db_connect_manager.js +++ b/src/game/lib/db_connect_manager.js @@ -399,6 +399,27 @@ DBConnectManager.prototype.requestAppRanking = function(maestroID, appID, onSucc ); } +DBConnectManager.prototype.requestLicenseTimeData = function(maestroID, playerID, defaultStartTime, onSucceededListener, onFailedListener) { + var xhr = new XMLHttpRequest(); + xhr.open("POST", this.phpPath + "server/license_timer/get_license_time_data.php", true); + xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); + xhr.onreadystatechange = function() { + if(xhr.readyState == 4 && xhr.status == 200) { + var replyJSON = JSON.parse(xhr.responseText); + + if(replyJSON != null) + onSucceededListener(replyJSON); + else + onFailedListener(replyJSON); + } + }; + xhr.send( + "MaestroID=" + maestroID + + "&PlayerID=" + playerID + + "&DefaultStartTime=" + defaultStartTime + ); +} + DBConnectManager.prototype.loadTempPlayerHistory = function(historyRecordManager) { historyRecordManager.push(new HistoryRecord("05/14", "space_invaders", 14460)); diff --git a/src/game/menu/menu_typing_test.js b/src/game/menu/menu_typing_test.js index 0389f0c..bf76589 100644 --- a/src/game/menu/menu_typing_test.js +++ b/src/game/menu/menu_typing_test.js @@ -137,7 +137,7 @@ var MenuTypingTest = { animalSprite = new Animal(Animal.TYPE_ICON, 0, 0, 0); // animalSprite.sprite.tint = RoundRectButtonSetting.DEFAULT_BUTTON_COLORS.disabled; } else { - var animalLevel = Animal.animalLevelIDByRecord(appHighestRecord, Animal.TYPE_PRACTICE); + var animalLevel = Animal.animalLevelIDByRecord(appHighestRecord, Animal.TYPE_TEST); animalSprite = new Animal(Animal.TYPE_ICON, animalLevel, 0, 0); } @@ -145,7 +145,7 @@ var MenuTypingTest = { }, downloadListSucceeded: function(replyJSON) { - // console.log(replyJSON); + console.log(replyJSON); var buttonWidthGap = TypingAppButton.BUTTON_WIDTH + MenuTypingTest.BUTTON_GAP;