After the following is set on an object - object:setFillColor( 0, 0, 255 ) - is there a way to remove the fill color?
Not 100% what you want, but you could set the alpha of the fill to 0 - would have the same effect.
object:setFillColor( 0, 0, 255 ,0 )
or you can set the alpha property individually using [lua]object.alpha = 0[/lua]
Thank you for the responses! Although this didn’t exactly work out for me, I went a different route with my game. I wanted to set a fill color for an object and then remove the fill color. But the problem was that the object didn’t have an initial fill color.
Have you tried setFillColor(255,255,255)?
(in G2.0 setFillColor(1,1,1) )
Hello! Yes, I did try setting the fill to white, but it turned the entire button to white. Instead of using fill, I went a different route. I guess you could delete this thread.
Not 100% what you want, but you could set the alpha of the fill to 0 - would have the same effect.
object:setFillColor( 0, 0, 255 ,0 )
or you can set the alpha property individually using [lua]object.alpha = 0[/lua]
Thank you for the responses! Although this didn’t exactly work out for me, I went a different route with my game. I wanted to set a fill color for an object and then remove the fill color. But the problem was that the object didn’t have an initial fill color.
Have you tried setFillColor(255,255,255)?
(in G2.0 setFillColor(1,1,1) )
Hello! Yes, I did try setting the fill to white, but it turned the entire button to white. Instead of using fill, I went a different route. I guess you could delete this thread.
Did you find a way to clear fills on G2.0?
I’ve tried setting the fill to {1,1,1} but instead of clearing it, it turns it to white. I’m applying the pixelate filter and can’t seem to find a way to clear it. Any ideas?
EDIT. Figured it out from a different post. If anyone is wondering: obj.fill.effect = “”
Thanks
obj.fill.effect = nil
should also work.
Rob
Did you find a way to clear fills on G2.0?
I’ve tried setting the fill to {1,1,1} but instead of clearing it, it turns it to white. I’m applying the pixelate filter and can’t seem to find a way to clear it. Any ideas?
EDIT. Figured it out from a different post. If anyone is wondering: obj.fill.effect = “”
Thanks
obj.fill.effect = nil
should also work.
Rob
This no longer works… just tried this on corona build 2014.2189.
To remove a fill color you do this now:
obj:setFillColor(1)
This no longer works… just tried this on corona build 2014.2189.
To remove a fill color you do this now:
obj:setFillColor(1)