Fix: button position
This commit is contained in:
@@ -59,16 +59,6 @@ var LicenseTimer = {
|
|||||||
|
|
||||||
// Timer
|
// Timer
|
||||||
var timerCenterX = game.world.centerX - 30;
|
var timerCenterX = game.world.centerX - 30;
|
||||||
var watchPosY = 100;
|
|
||||||
var watchTextStyle = { font: "24px Arial", fill: "#555", align: "center"};
|
|
||||||
this.hourText = game.add.text(timerCenterX - 175, watchPosY, "시간", watchTextStyle);
|
|
||||||
this.hourText.anchor.set(0.5);
|
|
||||||
|
|
||||||
this.minText = game.add.text(timerCenterX, watchPosY, "분", watchTextStyle);
|
|
||||||
this.minText.anchor.set(0.5);
|
|
||||||
|
|
||||||
this.secText = game.add.text(timerCenterX + 170, watchPosY, "초", watchTextStyle);
|
|
||||||
this.secText.anchor.set(0.5);
|
|
||||||
|
|
||||||
var timerTextStyle = { font: "bold 120px Arial", fill: "#fff", align: "center"};
|
var timerTextStyle = { font: "bold 120px Arial", fill: "#fff", align: "center"};
|
||||||
this.timerText = game.add.text(timerCenterX, 160, "00:00:00", timerTextStyle);
|
this.timerText = game.add.text(timerCenterX, 160, "00:00:00", timerTextStyle);
|
||||||
@@ -80,7 +70,8 @@ var LicenseTimer = {
|
|||||||
var setting = new RoundRectButtonSetting(0, 0, 0, 0);
|
var setting = new RoundRectButtonSetting(0, 0, 0, 0);
|
||||||
setting.fontStyle.boundsAlignH = "center"; // left, center. right
|
setting.fontStyle.boundsAlignH = "center"; // left, center. right
|
||||||
setting.fontStyle.boundsAlignV = "middle"; // top, middle, bottom
|
setting.fontStyle.boundsAlignV = "middle"; // top, middle, bottom
|
||||||
setting.strokeWidthPx = 5;
|
setting.strokeWidthPx = 3;
|
||||||
|
setting.roundAmount = 5;
|
||||||
|
|
||||||
|
|
||||||
// set timer buttons
|
// set timer buttons
|
||||||
@@ -94,6 +85,41 @@ var LicenseTimer = {
|
|||||||
(function() { console.log("1 hour"); }).bind(this)
|
(function() { console.log("1 hour"); }).bind(this)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// modify timer buttons
|
||||||
|
setting.x = timerCenterX - 30;
|
||||||
|
setting.y = 90;
|
||||||
|
setting.width = 50;
|
||||||
|
setting.height = 30;
|
||||||
|
var plus10minButton = new RoundRectButton(
|
||||||
|
setting,
|
||||||
|
null, "+",
|
||||||
|
(function() { console.log("+10 min"); }).bind(this)
|
||||||
|
);
|
||||||
|
|
||||||
|
setting.x = timerCenterX +30;
|
||||||
|
var plus1minButton = new RoundRectButton(
|
||||||
|
setting,
|
||||||
|
null, "+",
|
||||||
|
(function() { console.log("+1 min"); }).bind(this)
|
||||||
|
);
|
||||||
|
|
||||||
|
setting.x = timerCenterX - 30;
|
||||||
|
setting.y = 220;
|
||||||
|
var minus10minButton = new RoundRectButton(
|
||||||
|
setting,
|
||||||
|
null, "-",
|
||||||
|
(function() { console.log("-10 min"); }).bind(this)
|
||||||
|
);
|
||||||
|
|
||||||
|
setting.x = timerCenterX + 30;
|
||||||
|
var minus1minButton = new RoundRectButton(
|
||||||
|
setting,
|
||||||
|
null, "-",
|
||||||
|
(function() { console.log("-1 min"); }).bind(this)
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
// modify timer buttons
|
// modify timer buttons
|
||||||
setting.x = GAME_SCREEN_SIZE.x - 210;
|
setting.x = GAME_SCREEN_SIZE.x - 210;
|
||||||
setting.y = 120;
|
setting.y = 120;
|
||||||
@@ -126,6 +152,7 @@ var LicenseTimer = {
|
|||||||
null, "-1분",
|
null, "-1분",
|
||||||
(function() { console.log("-1 min"); }).bind(this)
|
(function() { console.log("-1 min"); }).bind(this)
|
||||||
);
|
);
|
||||||
|
*/
|
||||||
},
|
},
|
||||||
|
|
||||||
makeStartButtonGroup: function() {
|
makeStartButtonGroup: function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user