Add: stroke and line spacing

This commit is contained in:
2018-05-03 16:14:32 +09:00
parent 8b0eb7898f
commit f1a263b882
2 changed files with 30 additions and 43 deletions
@@ -1,38 +1,6 @@
/////////////////////////////
// Main game
/**** Phaser3 *****
var config = {
type: Phaser.AUTO,
width: 800,
height: 600,
physics: {
default: 'arcade',
arcade: {
gravity: { y: 200 }
}
},
scene: {
preload: preload,
create: create
}
};
var game = new Phaser.Game(config);
function preload() {
}
function create() {
console.log(game);
this.cameras.main.setBackgroundColor('#4d4d4d');
// game.stage.backgroundColor = '#4d4d4d';
// graphics = game.add.graphics(0, 0);
}
*/
var game = new Phaser.Game(1000, 800, Phaser.CANVAS, "RoundRectButton",
{preload:preload, create:create, update:update, render:render});
@@ -48,8 +16,17 @@ function create() {
graphics = game.add.graphics(0, 0);
let setting = new RoundRectButtonSetting(200, 100);
setting.fontStyle = {
fontSize: "30px",
align: "center",
fontWeight: "",
stroke: "red",
strokeThickness: 5
};
let button = new RoundRectButton(setting, "둥근 모서리\n버튼", dummy);
button.move(200, 200);
// button.lineSpacing = -10;
}
function dummy() {