beuleal Posted June 27, 2014 Share Posted June 27, 2014 Hi guys, im creating an interactive menu to start my simple game that i create a few minutes ago, and i cant attach some style to my 'start' option, check it:startText = game.add.text(game.world.centerX, 400, '- START THIS GAME -', { font: "40px Arial", fill: "#ffffff", align: "center", background-color:"red"}); Phaser returns "Unexpected token -", cuz im using background-color css style. Tks Link to comment Share on other sites More sharing options...
rich Posted June 27, 2014 Share Posted June 27, 2014 Phaser.Text isn't like CSS text, you can't just add CSS properties to it and hope they'll work, sorry. If it's not listed as a property on here: http://docs.phaser.io/Phaser.Text.html it can't be used. Link to comment Share on other sites More sharing options...
beuleal Posted June 27, 2014 Author Share Posted June 27, 2014 Thanks for ur reply! it was very helpfull! Ive no ideia how to create a nice menu without css style... do u have some tutorial or something like that? Link to comment Share on other sites More sharing options...
lewster32 Posted June 27, 2014 Share Posted June 27, 2014 You can use a menu with HTML and CSS over the top of Phaser with some positioning and z-index trickery, and in fact this ends up working very well. Link to comment Share on other sites More sharing options...
Recommended Posts