mirror of
https://github.com/4ian/GDevelop.git
synced 2025-10-15 10:19:04 +00:00
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:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user