Add: stroke and line spacing
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user