I have a quite simple (stupid ?) question : I can’t find a way to change a button’s label “fontSize” property. I tried changing button._view._fontSize, but the displayed result doesn’t change, event after changing the text via “setLabel”.
Do I really have to recreate a button while destroying the previous one ? Changing some text’s size seems to be something quite simple, so having to destroy my widget and re-creating for that doesn’t sound right to me.
Great info Brent! Anyway to do the same with the label color? I have a fire button that I need to turn the label (fire) when the gun is out of ammo! Thanks again. Mo
For those who want to go deeper into widgets, and know Lua well enough to do so, you can “unpack” the various tables and access different parameters. We’ve already given developers “hooks” into many of the most common things, but for non-common cases, you can access various parameters as you see fit.
Great info Brent! Anyway to do the same with the label color? I have a fire button that I need to turn the label (fire) when the gun is out of ammo! Thanks again. Mo
For those who want to go deeper into widgets, and know Lua well enough to do so, you can “unpack” the various tables and access different parameters. We’ve already given developers “hooks” into many of the most common things, but for non-common cases, you can access various parameters as you see fit.