Add: ESC key back(), Enter key start/restart to all features
This commit is contained in:
@@ -19,11 +19,18 @@ var Ranking = {
|
||||
// phaser.alpha = 0.1;
|
||||
|
||||
|
||||
// keyboard shortcut
|
||||
this.keyboardShortcut = new KeyboardShortcut();
|
||||
this.keyboardShortcut.addCallback(
|
||||
Phaser.KeyCode.ESC, // keyCode
|
||||
null, // keyDownHandler
|
||||
(function() { this.back(); }).bind(this), // keyUpHandler
|
||||
"ranking" // callerClassName
|
||||
);
|
||||
|
||||
// top ui
|
||||
var screenTopUI = new ScreenTopUI();
|
||||
screenTopUI.makeBackButton( function() {
|
||||
location.href = '../../web/client/start.html';
|
||||
});
|
||||
screenTopUI.makeBackButton( (function() { this.back(); }).bind(this) );
|
||||
screenTopUI.makeFullScreenButton();
|
||||
|
||||
|
||||
@@ -69,6 +76,11 @@ var Ranking = {
|
||||
game.time.events.loop(Phaser.Timer.SECOND * 10, this.getRecordToRankingServer, this);
|
||||
},
|
||||
|
||||
|
||||
back: function() {
|
||||
location.href = '../../web/client/start.html';
|
||||
},
|
||||
|
||||
makeTextButton: function(x, y, buttonText, eventListener) {
|
||||
var setting = new RoundRectButtonSetting(x, y, 200, 100);
|
||||
setting.fontStyle.fontWeight = "bold";
|
||||
|
||||
Reference in New Issue
Block a user