friendlygiraffe2 Posted December 19, 2014 Share Posted December 19, 2014 Hi - is there a way of setting CSS properties on button states? Rather than creating a sprite sheet, I'd like to set .alpha = 0.5 or something similarthis.playButton = this.add.button(this.world.centerX, this.world.height - 150, 'play', this.startGame, this, alpha: 0.5 ,alpha: 1 ,alpha: 0.3 );Thanks Link to comment Share on other sites More sharing options...
ranska Posted December 19, 2014 Share Posted December 19, 2014 Not sur but, if button are sprite. You can probably do something with this.http://docs.phaser.io/Phaser.Sprite.html#alphaor maby play with bitmap alpha mask, never try.http://examples.phaser.io/_site/view_full.html?d=bitmapdata&f=alpha+mask.js&t=alpha%20mask in doc there is also http://docs.phaser.io/Phaser.BitmapData.htmlfunction like copy have an alpha param. Let me know if you experiment are successful. Link to comment Share on other sites More sharing options...
Recommended Posts