Add: keyboard_shortcut to menu_typing_practice

This commit is contained in:
2018-10-12 11:11:11 +09:00
parent 5678e23df1
commit 18150fc332
3 changed files with 72 additions and 3 deletions
+13 -3
View File
@@ -39,11 +39,17 @@ var MenuTypingPractice = {
// );
this.keyboardShortcut = new KeyboardShortcut();
this.keyboardShortcut.addCallback(
Phaser.KeyCode.ESC, // keyCode
null, // keyDownHandler
(function() { this.back(); }).bind(this), // keyUpHandler
"menu_typing_practice" // callerClassName
);
// top ui
var screenTopUI = new ScreenTopUI();
screenTopUI.makeBackButton( function() {
location.href = '../../web/client/menu_app.html';
});
screenTopUI.makeBackButton( (function() { this.back(); }).bind(this) );
screenTopUI.makeFullScreenButton();
@@ -76,6 +82,10 @@ var MenuTypingPractice = {
this.makeActiveTypingPracticeAppButtons();
},
back: function() {
location.href = '../../web/client/menu_app.html';
},
makeActiveTypingPracticeAppButtons: function() {
var dbConnectManager = new DBConnectManager();