Color Components don't update
umberto-sonnino opened this issue · comments
I've noticed that ColorComponents aren't updating properly in the runtime, as they are not marked dirty on their own.
So for example: a static Rectangle with a gradient fill won't change its color/opacity.
On the other hand, if the rectangle is also animating the transform, it'll be updated through the transform dirt flag.
Here's an example file: Simple.Shapes.flr.zip
Which is this file.
A solution would be to add a new function to ActorPaint
class ActorPaint extends ActorComponent
{
[...]
markDirty()
{
this._Actor.addDirt(this, ColorDirty, true);
}
[...]
}
Which then can be called in Animation.apply()
when a ColorComponent is modified.
I've tested this locally and it works.
I tried the shapes-2 file in the example and it shows just a blank screen. Is there something additional that needs to be setup to get this to work?