Fix: remove aftereffect of ScreenBottom text
This commit is contained in:
@@ -23,9 +23,48 @@ function create() {
|
||||
가나다라마바사 아자차카타파하"
|
||||
);
|
||||
|
||||
SetBounds();
|
||||
|
||||
game.input.onDown.add(changeAlign, this);
|
||||
}
|
||||
|
||||
function SetBounds() {
|
||||
this.BOTTOM_BAR_HEIGHT = 50;
|
||||
this.BOTTOM_BAR_NAME_WIDTH = 200;
|
||||
this.BOTTOM_BAR_TEXT_OFFSET = 10;
|
||||
|
||||
this.bottomAreaPositionY = game.world.height - this.BOTTOM_BAR_HEIGHT;
|
||||
|
||||
let style = { font: "32px Arial", fill: "#fff", align: "left", boundsAlignH: "left", boundsAlignV: "bottom" };
|
||||
|
||||
let posX = this.BOTTOM_BAR_TEXT_OFFSET;
|
||||
this.leftText = game.add.text(posX, this.bottomAreaPositionY, "왼쪽", style)
|
||||
.setTextBounds(0, 0, this.BOTTOM_BAR_NAME_WIDTH, this.BOTTOM_BAR_HEIGHT)
|
||||
.addColor('#ffffff', 0);
|
||||
// .setShadow(3, 3, 'rgba(0, 0, 0, 0.5)', 2);
|
||||
this.leftText.stroke = "#333";
|
||||
this.leftText.strokeThickness = 5;
|
||||
|
||||
// let style = { font: "32px Arial", fill: "#fff", align: "center", boundsAlignH: "center", boundsAlignV: "bottom" };
|
||||
style.align = "center";
|
||||
style.boundsAlignH = "center";
|
||||
posX = game.world.width / 2 - this.BOTTOM_BAR_NAME_OFFSET_RIGHT;
|
||||
this.centerText = game.add.text(0, this.bottomAreaPositionY, "중간", style)
|
||||
.setTextBounds(0, 0, game.world.width, this.BOTTOM_BAR_HEIGHT)
|
||||
.addColor('#ffffff', 0);
|
||||
// .setShadow(3, 3, 'rgba(0, 0, 0, 0.5)', 2);
|
||||
|
||||
// let style = { font: "32px Arial", fill: "#fff", align: "right", boundsAlignH: "right", boundsAlignV: "bottom" };
|
||||
|
||||
style.align = "right";
|
||||
style.boundsAlignH = "right";
|
||||
posX = game.world.width - this.BOTTOM_BAR_NAME_WIDTH - this.BOTTOM_BAR_TEXT_OFFSET;
|
||||
this.rightText = game.add.text(posX, this.bottomAreaPositionY, "오른쪽", style)
|
||||
.setTextBounds(0, 0, this.BOTTOM_BAR_NAME_WIDTH, this.BOTTOM_BAR_HEIGHT)
|
||||
.addColor('#ffffff', 0);
|
||||
// .setShadow(3, 3, 'rgba(0, 0, 0, 0.5)', 2);
|
||||
}
|
||||
|
||||
function changeAlign() {
|
||||
console.log("print dummy");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user