Commit 87fcc532 authored by 18손재민's avatar 18손재민

메뉴 정렬 구현함

parent 04cc9c45
......@@ -29,7 +29,7 @@ socket.on('setId', function(msg) // {str, num playerNum}
// init game
socket.on('enterRoom', function()
{
fbClient.updateUserData('recentHopae', PlayerData.nickname);
fbClient.updateUserData('recentHopae', PlayerData.currentHopae);
Audio.killSound(ScenesData.menuScene, 'login');
ScenesData.changeScene('roomScene');
});
......
......@@ -251,7 +251,7 @@ class UserData
[
{name: prompt("첫번째 호패의 닉네임을 입력해주세요.\n(반드시 한글만 사용해주세요 띄어쓰기도 금지)"), type: 'wood'}
];
this.recentHopae = '';
this.recentHopae = null;
this.title = [];
this.money = 0;
this.item = [];
......
......@@ -35,7 +35,6 @@ Input.menuSceneEnterReaction = function()
if (Input.finalInput.length > 1)
{
PlayerData.nickname = Input.finalInput;
ScenesData.menuScene.currentHopae.setText('현재 호패 : ' + PlayerData.nickname);
Input.reset();
}
else
......
This diff is collapsed.
var UIObject = UIObject || {};
UIObject.createLabel = function (scene, x, y, depth, image, size, text = '', textSize = 24, textColor = '#000000', textOriginX = 0.5, textOriginY = 0.5) {
return scene.rexUI.add.label({
UIObject.createLabel = function (scene, x, y, depth, image, size, align, text = '', textSize = 24, textColor = '#000000', textOriginX = 0.5, textOriginY = 0.5) {
var temp = scene.rexUI.add.label({
/*width: width,
height: height,*/
x: x,
......@@ -20,6 +20,20 @@ UIObject.createLabel = function (scene, x, y, depth, image, size, text = '', tex
bottom: 10
}
});
switch(align)
{
case 'left':
temp.x += temp.getElement('background').width / 2;
break;
case 'right':
temp.x -= temp.getElement('background').width / 2;
break;
case 'center':
break;
default:
break;
}
return temp;
}
UIObject.createButton = function(scene, buttonGameObject, overFrame, outFrame, downFrame, clickCallback) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment