Fix sprite global color in HTML5

The action to modify the sprites global color is broken, this should fix it :)
Actually, just colors[2] needs to be converted to int, but this way is more clear.
This commit is contained in:
Lizard-13
2015-04-25 21:45:51 -03:00
parent 752d2a48cf
commit c8c654f5f8

View File

@@ -662,7 +662,7 @@ gdjs.SpriteRuntimeObject.prototype.setColor = function(rgbColor) {
var colors = rgbColor.split(";");
if ( colors.length < 3 ) return;
this._sprite.tint = gdjs.rgbToHex(colors[0], colors[1], colors[2]);
this._sprite.tint = "0x" + gdjs.rgbToHex(parseInt(colors[0]), parseInt(colors[1]), parseInt(colors[2]));
};
gdjs.SpriteRuntimeObject.prototype.flipX = function(enable) {