Fix: show / hide AnimalRecordList, TabLayout
This commit is contained in:
@@ -62,10 +62,7 @@ MainMenu.prototype.create = function() {
|
||||
graphics.drawRect(0, 0, GAME_SCREEN_SIZE.x, MainMenu.MAIN_MENU_HEIGHT);
|
||||
|
||||
this.appGroupTabLayout = null;
|
||||
|
||||
|
||||
this.animalRecordList = new AnimalRecordList(AnimalRecordList.TYPE_MENU);
|
||||
this.animalRecordList.printScore(AnimalList.TYPE_TEST);
|
||||
this.languageTabLayout = null;
|
||||
// this.animalRecordList.printScore(AnimalList.TYPE_PRACTICE);
|
||||
}
|
||||
|
||||
@@ -80,31 +77,23 @@ MainMenu.prototype.fontLoaded = function() {
|
||||
"menu_app" // callerClassName
|
||||
);
|
||||
|
||||
// top ui
|
||||
// var screenTopUI = new ScreenTopUI();
|
||||
// screenTopUI.makeBackButton( (function() { this.back(); }).bind(this) );
|
||||
// screenTopUI.makeFullScreenButton();
|
||||
// this.loadAllowEditEnterCode(screenTopUI);
|
||||
|
||||
// top UI
|
||||
this.makeButtons();
|
||||
this.makeAppGroupTab();
|
||||
|
||||
// bottom UI
|
||||
this.makeAnimalRecordList();
|
||||
this.animalRecordList.hide();
|
||||
this.makeLanguageTab();
|
||||
this.languageTabLayout.hide();
|
||||
|
||||
this.backButton.applyLoadedFont();
|
||||
this.settingButton.applyLoadedFont();
|
||||
this.appGroupTabLayout.applyLoadedFont();
|
||||
this.animalRecordList.applyLoadedFont();
|
||||
this.languageTabLayout.applyLoadedFont();
|
||||
|
||||
|
||||
// bottom ui
|
||||
/*
|
||||
var screenBottomUI = new ScreenBottomUI();
|
||||
// ScreenBottomUI.printLeftText("게임 진행 정보");
|
||||
// var playingAppName = appInfoManager.getAppNameKorean(sessionStorageManager.playingAppName);
|
||||
// ScreenBottomUI.printCenterText(playingAppName);
|
||||
screenBottomUI.printCenterText("메뉴");
|
||||
screenBottomUI.printRightText(sessionStorageManager.getPlayerName());
|
||||
*/
|
||||
|
||||
// welcome message
|
||||
new WelcomePlayerText(sessionStorageManager.getPlayerName());
|
||||
if(isExperiencePlayerAccount()) {
|
||||
game.time.events.add(Phaser.Timer.SECOND * 2.5,
|
||||
@@ -113,7 +102,6 @@ MainMenu.prototype.fontLoaded = function() {
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
this.loadAppData();
|
||||
}
|
||||
|
||||
@@ -145,12 +133,16 @@ MainMenu.prototype.loadAllowEditEnterCode = function(screenTopUI) {
|
||||
}
|
||||
|
||||
MainMenu.prototype.loadAppData = function() {
|
||||
// this.dbService.requestMainMenuAppData(
|
||||
// (function(replyJSON) {
|
||||
// this.updateAppGroupButton(replyJSON.appGroupData);
|
||||
// this.updateAppButtons(replyJSON.appData);
|
||||
// })
|
||||
// );
|
||||
this.dbService.requestMainMenuAppData(
|
||||
(function(replyJSON) {
|
||||
// this.updateAppGroupTab(replyJSON.appGroupData);
|
||||
// this.updateAppButtons(replyJSON.appGroup, replyJSON.appData);
|
||||
// this.updateLanguageTab(replyJSON.appGroup);
|
||||
}).bind(this),
|
||||
(function(replyJSON) {
|
||||
console.log(replyJSON);
|
||||
}).bind(this)
|
||||
);
|
||||
|
||||
/*
|
||||
var dbConnectManager = new DBConnectManager();
|
||||
@@ -218,17 +210,35 @@ MainMenu.prototype.makeAppGroupTab = function() {
|
||||
typingTestGroupTab.reserveSubText("시험");
|
||||
this.appGroupTabLayout.add(typingTestGroupTab);
|
||||
|
||||
var typingPlayGroupTab = new AppGroupTab( (function() { console.log("typing exam"); }).bind(this) );
|
||||
// var typingPlayGroupTab = new AppGroupTab( (function() { console.log("typing exam"); }).bind(this) );
|
||||
var typingPlayGroupTab = new AppGroupTab(
|
||||
(function() { console.log("typing exam"); this.animalRecordList.show(); this.languageTabLayout.show(); }).bind(this)
|
||||
);
|
||||
typingPlayGroupTab.reserveIcon("keyboard");
|
||||
typingPlayGroupTab.reserveSubText("놀이");
|
||||
this.appGroupTabLayout.add(typingPlayGroupTab);
|
||||
|
||||
var mousePlayGroupTab = new AppGroupTab( (function() { console.log("mouse exam"); }).bind(this) );
|
||||
// var mousePlayGroupTab = new AppGroupTab( (function() { console.log("mouse exam"); }).bind(this) );
|
||||
var mousePlayGroupTab = new AppGroupTab(
|
||||
(function() { console.log("mouse exam"); this.animalRecordList.hide(); this.languageTabLayout.hide(); }).bind(this)
|
||||
);
|
||||
mousePlayGroupTab.reserveIcon("mouse");
|
||||
mousePlayGroupTab.reserveSubText("놀이");
|
||||
this.appGroupTabLayout.add(mousePlayGroupTab);
|
||||
|
||||
this.appGroupTabLayout.createTabs();
|
||||
|
||||
|
||||
// typingFingerGroupTab.setInputEnabled(false);
|
||||
// typingPracticeGroupTab.setInputEnabled(false);
|
||||
// typingTestGroupTab.setInputEnabled(false);
|
||||
// typingPlayGroupTab.setInputEnabled(false);
|
||||
// mousePlayGroupTab.setInputEnabled(false);
|
||||
}
|
||||
|
||||
MainMenu.prototype.makeAnimalRecordList = function() {
|
||||
this.animalRecordList = new AnimalRecordList(AnimalRecordList.TYPE_MENU);
|
||||
this.animalRecordList.printScore(AnimalList.TYPE_TEST);
|
||||
}
|
||||
|
||||
MainMenu.prototype.makeLanguageTab = function() {
|
||||
|
||||
Reference in New Issue
Block a user