Add: menu_list.php
This commit is contained in:
@@ -63,6 +63,9 @@ MainMenu.prototype.create = function() {
|
||||
|
||||
this.appGroupTabLayout = null;
|
||||
this.languageTabLayout = null;
|
||||
|
||||
this.selectedAppGroup = MainMenu.APP_GROUP_FINGER_POSITION;
|
||||
this.selectedLanguage = MainMenu.LANGUAGE_KOREAN;
|
||||
// this.animalRecordList.printScore(AnimalList.TYPE_PRACTICE);
|
||||
}
|
||||
|
||||
@@ -83,9 +86,9 @@ MainMenu.prototype.fontLoaded = function() {
|
||||
|
||||
// bottom UI
|
||||
this.makeAnimalRecordList();
|
||||
this.animalRecordList.hide();
|
||||
this.makeLanguageTab();
|
||||
this.languageTabLayout.hide();
|
||||
// this.animalRecordList.hide();
|
||||
// this.languageTabLayout.hide();
|
||||
|
||||
this.backButton.applyLoadedFont();
|
||||
this.settingButton.applyLoadedFont();
|
||||
@@ -134,6 +137,8 @@ MainMenu.prototype.loadAllowEditEnterCode = function(screenTopUI) {
|
||||
|
||||
MainMenu.prototype.loadAppData = function() {
|
||||
this.dbService.requestMainMenuAppData(
|
||||
this.selectedAppGroup,
|
||||
this.selectedLanguage,
|
||||
(function(replyJSON) {
|
||||
// this.updateAppGroupTab(replyJSON.appGroupData);
|
||||
// this.updateAppButtons(replyJSON.appGroup, replyJSON.appData);
|
||||
@@ -195,32 +200,67 @@ MainMenu.prototype.makeButtons = function() {
|
||||
MainMenu.prototype.makeAppGroupTab = function() {
|
||||
this.appGroupTabLayout = new TabLayout(100, 0, 844, 70);
|
||||
|
||||
var typingFingerGroupTab = new AppGroupTab( (function() { console.log("typing finger position"); }).bind(this) );
|
||||
var typingFingerGroupTab = new AppGroupTab(
|
||||
(function() {
|
||||
console.log("typing finger position");
|
||||
this.selectedAppGroup = MainMenu.APP_GROUP_FINGER_POSITION;
|
||||
this.animalRecordList.show();
|
||||
this.languageTabLayout.show();
|
||||
}).bind(this)
|
||||
);
|
||||
typingFingerGroupTab.reserveIcon("keyboard");
|
||||
typingFingerGroupTab.reserveSubText("손가락 위치");
|
||||
this.appGroupTabLayout.add(typingFingerGroupTab);
|
||||
|
||||
var typingPracticeGroupTab = new AppGroupTab( (function() { console.log("typing practice"); }).bind(this) );
|
||||
var typingPracticeGroupTab = new AppGroupTab(
|
||||
(function() {
|
||||
console.log("typing practice");
|
||||
this.selectedAppGroup = MainMenu.APP_GROUP_TYPING_PRACTICE;
|
||||
this.animalRecordList.show();
|
||||
this.languageTabLayout.show();
|
||||
}).bind(this)
|
||||
);
|
||||
typingPracticeGroupTab.reserveIcon("keyboard");
|
||||
typingPracticeGroupTab.reserveSubText("연습");
|
||||
this.appGroupTabLayout.add(typingPracticeGroupTab);
|
||||
|
||||
var typingTestGroupTab = new AppGroupTab( (function() { console.log("typing exam"); }).bind(this) );
|
||||
var typingTestGroupTab = new AppGroupTab(
|
||||
(function() {
|
||||
console.log("typing test");
|
||||
this.selectedAppGroup = MainMenu.APP_GROUP_TYPING_TEST;
|
||||
this.animalRecordList.show();
|
||||
this.languageTabLayout.show();
|
||||
}).bind(this)
|
||||
);
|
||||
typingTestGroupTab.reserveIcon("keyboard");
|
||||
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 test"); }).bind(this) );
|
||||
var typingPlayGroupTab = new AppGroupTab(
|
||||
(function() { console.log("typing exam"); this.animalRecordList.show(); this.languageTabLayout.show(); }).bind(this)
|
||||
(function() { console.log("typing play"); }).bind(this)
|
||||
);
|
||||
var typingPlayGroupTab = new AppGroupTab(
|
||||
(function() {
|
||||
console.log("typing play");
|
||||
this.selectedAppGroup = MainMenu.APP_GROUP_TYPING_PLAY;
|
||||
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 play"); }).bind(this) );
|
||||
var mousePlayGroupTab = new AppGroupTab(
|
||||
(function() { console.log("mouse exam"); this.animalRecordList.hide(); this.languageTabLayout.hide(); }).bind(this)
|
||||
(function() { console.log("mouse play"); this.animalRecordList.hide(); this.languageTabLayout.hide(); }).bind(this)
|
||||
);
|
||||
var typingFingerGroupTab = new AppGroupTab(
|
||||
(function() {
|
||||
console.log("typing finger position");
|
||||
this.selectedAppGroup = MainMenu.APP_GROUP_FINGER_POSITION;
|
||||
}).bind(this)
|
||||
);
|
||||
mousePlayGroupTab.reserveIcon("mouse");
|
||||
mousePlayGroupTab.reserveSubText("놀이");
|
||||
@@ -245,11 +285,21 @@ MainMenu.prototype.makeLanguageTab = function() {
|
||||
var languageTabHeight = 48;
|
||||
this.languageTabLayout = new TabLayout(0, GAME_SCREEN_SIZE.y - languageTabHeight, GAME_SCREEN_SIZE.x, languageTabHeight);
|
||||
|
||||
var koreanTab = new LanguageTab( (function() { console.log("Language : Korean"); }).bind(this) );
|
||||
var koreanTab = new LanguageTab(
|
||||
(function() {
|
||||
console.log("Language : Korean");
|
||||
this.selectedLanguage = MainMenu.LANGUAGE_KOREAN;
|
||||
}).bind(this)
|
||||
);
|
||||
koreanTab.reserveMainText("한글");
|
||||
this.languageTabLayout.add(koreanTab);
|
||||
|
||||
var englishTab = new LanguageTab( (function() { console.log("Language : English"); }).bind(this) );
|
||||
var englishTab = new LanguageTab(
|
||||
(function() {
|
||||
console.log("Language : English");
|
||||
this.selectedLanguage = MainMenu.LANGUAGE_ENGLISH;
|
||||
}).bind(this)
|
||||
);
|
||||
englishTab.reserveMainText("영어");
|
||||
this.languageTabLayout.add(englishTab);
|
||||
|
||||
@@ -392,4 +442,13 @@ MainMenu.prototype.loadFailed = function(replyJSON) {
|
||||
}
|
||||
|
||||
|
||||
MainMenu.MAIN_MENU_HEIGHT = 70;
|
||||
MainMenu.MAIN_MENU_HEIGHT = 70;
|
||||
|
||||
MainMenu.APP_GROUP_FINGER_POSITION = 0;
|
||||
MainMenu.APP_GROUP_TYPING_PRACTICE = 1;
|
||||
MainMenu.APP_GROUP_TYPING_TEST = 2;
|
||||
MainMenu.APP_GROUP_TYPING_PLAY = 3;
|
||||
MainMenu.APP_GROUP_MOUSE_PLAY = 4;
|
||||
|
||||
MainMenu.LANGUAGE_KOREAN = 0;
|
||||
MainMenu.LANGUAGE_ENGLISH = 1;
|
||||
Reference in New Issue
Block a user