Add: home button

This commit is contained in:
2018-10-16 12:20:03 +09:00
parent 9061ab54c3
commit e6c9dd95f1
6 changed files with 62 additions and 4 deletions
+16 -4
View File
@@ -2,6 +2,7 @@ var Login = {
preload: function() {
game.load.image('icon_fullscreen', '../../../resources/image/icon/fullscreen_white.png');
game.load.image('icon_home', '../../../resources/image/icon/home.png');
},
create: function() {
@@ -10,12 +11,18 @@ var Login = {
this.game.stage.backgroundColor = '#4d4d4d';
this.textStyle = { font: "bold 32px Arial", fill: "#fff", align: "right", boundsAlignH: "right", boundsAlignV: "middle" };
// keyboard shortcut
this.keyboardShortcut = new KeyboardShortcut();
this.keyboardShortcut.addCallback(
Phaser.KeyCode.ESC, // keyCode
null, // keyDownHandler
(function() { this.back(); }).bind(this), // keyUpHandler
"login" // callerClassName
);
// top ui
var screenTopUI = new ScreenTopUI();
screenTopUI.makeBackButton( function() {
sessionStorageManager.clear();
location.href = '../../web/main/index.html';
});
screenTopUI.makeHomeButton( (function() { this.back(); }).bind(this) );
screenTopUI.makeFullScreenButton();
@@ -36,6 +43,11 @@ var Login = {
this.makeInfoText();
},
back: function() {
sessionStorageManager.clear();
location.href = '../../web/main/index.html';
},
makeMaestroNameText: function(x, y) {
this.makeTextField(x, y, "마에스트로 계정 :");
this.inputTextMaestroName = this.makeInputTypeText(x, y, "jisangs");