Add: ESC key back(), Enter key start/restart to all features
This commit is contained in:
@@ -32,12 +32,18 @@ var MenuApp = {
|
||||
);
|
||||
|
||||
|
||||
// keyboard shortcut
|
||||
this.keyboardShortcut = new KeyboardShortcut();
|
||||
this.keyboardShortcut.addCallback(
|
||||
Phaser.KeyCode.ESC, // keyCode
|
||||
null, // keyDownHandler
|
||||
(function() { this.back(); }).bind(this), // keyUpHandler
|
||||
"menu_app" // callerClassName
|
||||
);
|
||||
|
||||
// top ui
|
||||
var screenTopUI = new ScreenTopUI();
|
||||
screenTopUI.makeBackButton( function() {
|
||||
sessionStorageManager.clear();
|
||||
location.href = '../../web/client/login.html';
|
||||
});
|
||||
screenTopUI.makeBackButton( (function() { this.back(); }).bind(this) );
|
||||
screenTopUI.makeFullScreenButton();
|
||||
|
||||
|
||||
@@ -62,6 +68,10 @@ var MenuApp = {
|
||||
},
|
||||
|
||||
|
||||
back: function() {
|
||||
sessionStorageManager.clear();
|
||||
location.href = '../../web/client/login.html';
|
||||
},
|
||||
|
||||
loadAppData: function() {
|
||||
var dbConnectManager = new DBConnectManager();
|
||||
|
||||
@@ -39,6 +39,7 @@ var MenuTypingPractice = {
|
||||
// );
|
||||
|
||||
|
||||
// keyboard shortcut
|
||||
this.keyboardShortcut = new KeyboardShortcut();
|
||||
this.keyboardShortcut.addCallback(
|
||||
Phaser.KeyCode.ESC, // keyCode
|
||||
@@ -82,11 +83,11 @@ var MenuTypingPractice = {
|
||||
this.makeActiveTypingPracticeAppButtons();
|
||||
},
|
||||
|
||||
|
||||
back: function() {
|
||||
location.href = '../../web/client/menu_app.html';
|
||||
},
|
||||
|
||||
|
||||
makeActiveTypingPracticeAppButtons: function() {
|
||||
var dbConnectManager = new DBConnectManager();
|
||||
dbConnectManager.requestTypingPracticeAppList(
|
||||
|
||||
@@ -39,11 +39,18 @@ var MenuTypingTest = {
|
||||
// );
|
||||
|
||||
|
||||
// keyboard shortcut
|
||||
this.keyboardShortcut = new KeyboardShortcut();
|
||||
this.keyboardShortcut.addCallback(
|
||||
Phaser.KeyCode.ESC, // keyCode
|
||||
null, // keyDownHandler
|
||||
(function() { this.back(); }).bind(this), // keyUpHandler
|
||||
"menu_typing_test" // callerClassName
|
||||
);
|
||||
|
||||
// top ui
|
||||
var screenTopUI = new ScreenTopUI();
|
||||
screenTopUI.makeBackButton( function() {
|
||||
location.href = '../../web/client/menu_app.html';
|
||||
});
|
||||
screenTopUI.makeBackButton( function() { (function() { this.back(); }).bind(this) });
|
||||
screenTopUI.makeFullScreenButton();
|
||||
|
||||
|
||||
@@ -77,6 +84,10 @@ var MenuTypingTest = {
|
||||
},
|
||||
|
||||
|
||||
back: function() {
|
||||
location.href = '../../web/client/menu_app.html';
|
||||
},
|
||||
|
||||
makeActiveTypingTestAppButtons: function() {
|
||||
var dbConnectManager = new DBConnectManager();
|
||||
dbConnectManager.requestTypingTestAppList(
|
||||
|
||||
Reference in New Issue
Block a user