Add: update and make buttons methods
This commit is contained in:
@@ -163,31 +163,65 @@ MainMenu.prototype.loadAppData = function() {
|
||||
*/
|
||||
}
|
||||
|
||||
MainMenu.prototype.removeAllButtons = function() {
|
||||
// remove all buttons
|
||||
}
|
||||
|
||||
MainMenu.prototype.updateAppButtons = function(appGroup, appData) {
|
||||
switch(appGroup) {
|
||||
this.removeAllButtons();
|
||||
|
||||
switch(parseInt(appGroup)) {
|
||||
case MainMenu.APP_GROUP_FINGER_POSITION:
|
||||
this.makeFingerPositionAppButtons();
|
||||
this.makeFingerPositionAppButtons(appData);
|
||||
break;
|
||||
|
||||
case MainMenu.APP_GROUP_TYPING_PRACTICE:
|
||||
this.makeTypingPracticeAppButtons();
|
||||
this.makeTypingPracticeAppButtons(appData);
|
||||
break;
|
||||
|
||||
case MainMenu.APP_GROUP_TYPING_EXAM:
|
||||
this.makeTypingExamAppButtons();
|
||||
this.makeTypingExamAppButtons(appData);
|
||||
break;
|
||||
|
||||
case MainMenu.APP_GROUP_TYPING_PLAY:
|
||||
this.makeTypingPlayAppButtons();
|
||||
this.makeTypingPlayAppButtons(appData);
|
||||
break;
|
||||
|
||||
case MainMenu.APP_GROUP_MOUSE_PLAY:
|
||||
this.makeMousePlayAppButtons();
|
||||
this.makeMousePlayAppButtons(appData);
|
||||
break;
|
||||
|
||||
default:
|
||||
console.log(appGroup);
|
||||
}
|
||||
}
|
||||
|
||||
MainMenu.prototype.makeFingerPositionAppButtons = function(appData) {
|
||||
console.log("makeFingerPositionAppButtons");
|
||||
console.log(appData);
|
||||
}
|
||||
|
||||
MainMenu.prototype.makeTypingPracticeAppButtons = function(appData) {
|
||||
console.log("makeTypingPracticeAppButtons");
|
||||
console.log(appData);
|
||||
}
|
||||
|
||||
MainMenu.prototype.makeTypingExamAppButtons = function(appData) {
|
||||
console.log("makeTypingExamAppButtons");
|
||||
console.log(appData);
|
||||
}
|
||||
|
||||
MainMenu.prototype.makeTypingPlayAppButtons = function(appData) {
|
||||
console.log("makeTypingPlayAppButtons");
|
||||
console.log(appData);
|
||||
}
|
||||
|
||||
MainMenu.prototype.makeMousePlayAppButtons = function(appData) {
|
||||
console.log("makeMousePlayAppButtons");
|
||||
console.log(appData);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
MainMenu.prototype.loadSucceeded = function(replyJSON) {
|
||||
// console.log(replyJSON);
|
||||
@@ -234,6 +268,7 @@ MainMenu.prototype.makeAppGroupTab = function() {
|
||||
this.animalRecordList.show();
|
||||
this.animalRecordList.printScore(Animal.TYPE_FINGER_POSITION);
|
||||
this.languageTabLayout.show();
|
||||
this.loadAppData();
|
||||
}).bind(this)
|
||||
);
|
||||
typingFingerGroupTab.reserveIcon("keyboard");
|
||||
@@ -247,6 +282,7 @@ MainMenu.prototype.makeAppGroupTab = function() {
|
||||
this.animalRecordList.show();
|
||||
this.animalRecordList.printScore(Animal.TYPE_PRACTICE);
|
||||
this.languageTabLayout.show();
|
||||
this.loadAppData();
|
||||
}).bind(this)
|
||||
);
|
||||
typingPracticeGroupTab.reserveIcon("keyboard");
|
||||
@@ -260,6 +296,7 @@ MainMenu.prototype.makeAppGroupTab = function() {
|
||||
this.animalRecordList.show();
|
||||
this.animalRecordList.printScore(Animal.TYPE_EXAM);
|
||||
this.languageTabLayout.show();
|
||||
this.loadAppData();
|
||||
}).bind(this)
|
||||
);
|
||||
typingExamGroupTab.reserveIcon("keyboard");
|
||||
@@ -272,6 +309,7 @@ MainMenu.prototype.makeAppGroupTab = function() {
|
||||
this.selectedAppGroup = MainMenu.APP_GROUP_TYPING_PLAY;
|
||||
this.animalRecordList.hide();
|
||||
this.languageTabLayout.show();
|
||||
this.loadAppData();
|
||||
}).bind(this)
|
||||
);
|
||||
typingPlayGroupTab.reserveIcon("keyboard");
|
||||
@@ -284,6 +322,7 @@ MainMenu.prototype.makeAppGroupTab = function() {
|
||||
this.selectedAppGroup = MainMenu.APP_GROUP_MOUSE_PLAY;
|
||||
this.animalRecordList.hide();
|
||||
this.languageTabLayout.hide();
|
||||
this.loadAppData();
|
||||
}).bind(this)
|
||||
);
|
||||
mousePlayGroupTab.reserveIcon("mouse");
|
||||
@@ -314,6 +353,7 @@ MainMenu.prototype.makeLanguageTab = function() {
|
||||
(function() {
|
||||
console.log("Language : Korean");
|
||||
this.selectedLanguage = MainMenu.LANGUAGE_KOREAN;
|
||||
this.loadAppData();
|
||||
}).bind(this)
|
||||
);
|
||||
koreanTab.reserveMainText("한글");
|
||||
@@ -323,6 +363,7 @@ MainMenu.prototype.makeLanguageTab = function() {
|
||||
(function() {
|
||||
console.log("Language : English");
|
||||
this.selectedLanguage = MainMenu.LANGUAGE_ENGLISH;
|
||||
this.loadAppData();
|
||||
}).bind(this)
|
||||
);
|
||||
englishTab.reserveMainText("영어");
|
||||
|
||||
Reference in New Issue
Block a user