Update button widget text color.

Hi all,

I want to update the button text color, not the fill or stroke I found methods for that but cant find any methods for setting the button text color after initialization, I’m trying to do something like this: 

btn:setLabelColor(1,1,1,0)

I get an issue calling this:

btn:setLabelColor()

but calling these are fine

btn:setStrokeColor( 1, 1, 1,0 ) btn:setFillColor( 1, 1, 1,0 )

And in the constructor of the btn we can set 

fillColor = { default={ 127/255, 127/255, 127/255 , 0.3 }, over={ 1, 0.2, 0.5, 0.5} }, labelColor = { default={ 82/255,241/255,12/255 }, over={ 82/255,241/255,12/255, 1 } }, strokeColor = { default={82/255,241/255,12/255,1}, over={82/255,241/255,12/255 ,1} },

but nothing to set label color after init?

setStrokeColor() and setFillColor() are general functions for changing the stroke or fill color of text and vector objects, so they work after an object has been created. labelColor is an optional parameter for when you create buttons using the widget, so it does not work after the object has been created.

You can find how the widget works here: https://github.com/coronalabs/framework-widget.

I personally create buttons and text separately. That way I better customise the fonts as well as better control them afterwards.

setStrokeColor() and setFillColor() are general functions for changing the stroke or fill color of text and vector objects, so they work after an object has been created. labelColor is an optional parameter for when you create buttons using the widget, so it does not work after the object has been created.

You can find how the widget works here: https://github.com/coronalabs/framework-widget.

I personally create buttons and text separately. That way I better customise the fonts as well as better control them afterwards.