Fix: screen top ui, screen bottom ui

This commit is contained in:
2018-09-03 09:15:50 +09:00
parent ac46b61539
commit 8cf7f67ac6
24 changed files with 197 additions and 153 deletions
+2 -2
View File
@@ -20,8 +20,8 @@ class AppAreaBG {
AppAreaBG.COLOR_MOUSE_APP = 0xffce54;
AppAreaBG.COLOR_TYPING_APP = 0x99ccff;
AppAreaBG.COLOR_TYPING_KOREAN = 0x88bbff;
AppAreaBG.COLOR_TYPING_ENGLISH = 0xbbccff;
AppAreaBG.COLOR_TYPING_KOREAN = 0xbbccff;
AppAreaBG.COLOR_TYPING_ENGLISH = 0x88bbff;
AppAreaBG.GAP_X = 10;
AppAreaBG.GAP_Y = 10;
+12 -13
View File
@@ -5,7 +5,6 @@ class MenuApp {
preload() {
game.load.image('icon_fullscreen', '../../../resources/image/icon/fullscreen_white.png');
game.load.image('space_invaders', '../../../resources/image/icon/space_invaders.png');
}
create() {
@@ -30,27 +29,27 @@ class MenuApp {
);
typingBG.printText(
"타 자 연 습 앱",
game.world.centerX, 500,
game.world.centerX, 490,
170, "#000", 0.03
);
// top
let backButton = new BackButton( () => {
// top ui
let screenTopUI = new ScreenTopUI();
screenTopUI.makeBackButton( () => {
sessionStorageManager.clear();
location.href = '../../web/client/login.html';
});
let fullscreenButton = new FullscreenButton();
screenTopUI.makeFullScreenButton();
// bottom
let screenBottom = new ScreenBottom();
// screenBottom.printBottomLeftText("게임 진행 정보");
// bottom ui
let screenBottomUI = new ScreenBottomUI();
// ScreenBottomUI.printLeftText("게임 진행 정보");
// let playingAppName = appInfoManager.getAppNameKorean(sessionStorageManager.playingAppName);
// screenBottom.printBottomCenterText(playingAppName);
screenBottom.printBottomCenterText("메뉴");
screenBottom.printBottomRightText(sessionStorageManager.playerName);
// ScreenBottomUI.printCenterText(playingAppName);
screenBottomUI.printCenterText("메뉴");
screenBottomUI.printRightText(sessionStorageManager.playerName);
new WelcomePlayerText(sessionStorageManager.playerName);
@@ -69,7 +68,7 @@ class MenuApp {
}
loadSucceeded(replyJSON) {
console.log(replyJSON);
// console.log(replyJSON);
self.makeMouseAppButtons(
replyJSON.MouseAppList,
+21 -20
View File
@@ -14,13 +14,6 @@ class MenuTypingPractice {
self = this;
this.game.stage.backgroundColor = '#4d4d4d';
// top
let backButton = new BackButton( () => {
location.href = '../../web/client/menu_app.html';
});
let fullscreenButton = new FullscreenButton(this.game);
// typing app area
let typingBG = new AppAreaBG(AppAreaBG.COLOR_TYPING_APP, 1,
0, 60,
@@ -28,10 +21,10 @@ class MenuTypingPractice {
);
// korean app area
let koreanBG = new AppAreaBG(AppAreaBG.COLOR_TYPING_KOREAN, 1,
AppAreaBG.MARGIN_X, 60 + AppAreaBG.GAP_Y,
GAME_SCREEN_SIZE.x - AppAreaBG.MARGIN_X * 2, 270
);
// let koreanBG = new AppAreaBG(AppAreaBG.COLOR_TYPING_KOREAN, 1,
// AppAreaBG.MARGIN_X, 60 + AppAreaBG.GAP_Y,
// GAME_SCREEN_SIZE.x - AppAreaBG.MARGIN_X * 2, 270
// );
// koreanBG.printText(
// "한 글 타 자",
// game.world.centerX, 320,
@@ -39,10 +32,10 @@ class MenuTypingPractice {
// );
// english app area
let englishBG = new AppAreaBG(AppAreaBG.COLOR_TYPING_ENGLISH, 1,
AppAreaBG.MARGIN_X, 340,
GAME_SCREEN_SIZE.x - AppAreaBG.MARGIN_X * 2, 270
);
// let englishBG = new AppAreaBG(AppAreaBG.COLOR_TYPING_ENGLISH, 1,
// AppAreaBG.MARGIN_X, 340,
// GAME_SCREEN_SIZE.x - AppAreaBG.MARGIN_X * 2, 270
// );
// englishBG.printText(
// "영 문 타 자",
// game.world.centerX, 370,
@@ -50,6 +43,14 @@ class MenuTypingPractice {
// );
// top ui
let screenTopUI = new ScreenTopUI();
screenTopUI.makeBackButton( () => {
location.href = '../../web/client/menu_app.html';
});
screenTopUI.makeFullScreenButton();
// typing tab buttons
let typingPracticeTabButton = new TypingTabButton(
TypingTabButton.PRACTICE_BUTTON_POS_X, TypingTabButton.BUTTON_POS_Y,
@@ -69,11 +70,11 @@ class MenuTypingPractice {
);
// typingTestTabButton.inputEnabled = false;
// bottom
let screenBottom = new ScreenBottom();
// screenBottom.printBottomLeftText("게임 진행 정보");
screenBottom.printBottomCenterText("메뉴 > 타자 연습");
screenBottom.printBottomRightText(sessionStorageManager.playerName);
// bottom ui
let screenBottomUI = new ScreenBottomUI();
// screenBottomUI.printLeftText("게임 진행 정보");
screenBottomUI.printCenterText("메뉴 > 타자 연습");
screenBottomUI.printRightText(sessionStorageManager.playerName);
this.makeActiveTypingPracticeAppButtons();
+21 -20
View File
@@ -14,13 +14,6 @@ class MenuTypingTest {
self = this;
this.game.stage.backgroundColor = '#4d4d4d';
// top
let backButton = new BackButton( () => {
location.href = '../../web/client/menu_app.html';
});
let fullscreenButton = new FullscreenButton(this.game);
// typing app area
let typingBG = new AppAreaBG(AppAreaBG.COLOR_TYPING_APP, 1,
0, 60,
@@ -28,10 +21,10 @@ class MenuTypingTest {
);
// korean app area
let koreanBG = new AppAreaBG(AppAreaBG.COLOR_TYPING_KOREAN, 1,
0, 60 + AppAreaBG.GAP_Y,
GAME_SCREEN_SIZE.x, 270
);
// let koreanBG = new AppAreaBG(AppAreaBG.COLOR_TYPING_KOREAN, 1,
// 0, 60 + AppAreaBG.GAP_Y,
// GAME_SCREEN_SIZE.x, 270
// );
// koreanBG.printText(
// "한 글 타 자",
// game.world.centerX, 320,
@@ -39,10 +32,10 @@ class MenuTypingTest {
// );
// english app area
let englishBG = new AppAreaBG(AppAreaBG.COLOR_TYPING_ENGLISH, 1,
0, 340,
GAME_SCREEN_SIZE.x, 270
);
// let englishBG = new AppAreaBG(AppAreaBG.COLOR_TYPING_ENGLISH, 1,
// 0, 340,
// GAME_SCREEN_SIZE.x, 270
// );
// englishBG.printText(
// "영 문 타 자",
// game.world.centerX, 370,
@@ -50,12 +43,13 @@ class MenuTypingTest {
// );
// top ui
let screenTopUI = new ScreenTopUI();
screenTopUI.makeBackButton( () => {
location.href = '../../web/client/menu_app.html';
});
screenTopUI.makeFullScreenButton();
// bottom
let screenBottom = new ScreenBottom();
// screenBottom.printBottomLeftText("게임 진행 정보");
screenBottom.printBottomCenterText("메뉴 > 타자 시험");
screenBottom.printBottomRightText(sessionStorageManager.playerName);
// typing tab buttons
let typingPracticeTabButton = new TypingTabButton(
@@ -77,6 +71,13 @@ class MenuTypingTest {
typingTestTabButton.inputEnabled = false;
this.makeActiveTypingTestAppButtons();
// bottom ui
let screenBottomUI = new ScreenBottomUI();
// screenBottomUI.printLeftText("게임 진행 정보");
screenBottomUI.printCenterText("메뉴 > 타자 시험");
screenBottomUI.printRightText(sessionStorageManager.playerName);
}
+4 -4
View File
@@ -1,7 +1,7 @@
class WelcomePlayerText extends Phaser.Text {
constructor(playerName) {
super(game, game.world.width / 2, 32, "어서오세요, " + playerName + "님", WelcomePlayerText.DEFAULT_TEXT_FONT);
super(game, game.world.width / 2, game.world.height / 2 - 40, "어서오세요, " + playerName + "님", WelcomePlayerText.DEFAULT_TEXT_FONT);
this.anchor.set(0.5);
this.inputEnabled = false;
@@ -14,9 +14,9 @@ class WelcomePlayerText extends Phaser.Text {
this.stroke = '#000';
this.strokeThickness = 5;
this.alpha = 0;
this.alpha = 1;
let tweenAlpha = game.add.tween(this);
tweenAlpha.to( { alpha: 1 }, 500, Phaser.Easing.Linear.None, true);
tweenAlpha.to( { alpha: 0 }, 2000, Phaser.Easing.Back.In, true);
game.add.existing(this);
};
@@ -28,7 +28,7 @@ class WelcomePlayerText extends Phaser.Text {
}
WelcomePlayerText.DEFAULT_TEXT_FONT = {
font: "40px Arial",
font: "60px Arial",
boundsAlignH: "center", // left, center. right
boundsAlignV: "middle", // top, middle, bottom
fill: "#fff"