PDA

View Full Version : [LUA] - Enable/disable field on charsheet via LUA



deer_buster
September 15th, 2019, 08:59
Is there an example available for enabling/disabling a field on a charsheet (such as when changing a setting)?

I have (currently) two optional fields that would be enabled or disabled via settings. I have checks in char.lua that are aware of the changes in the settings, but I do not know if it is even possible to enable/disable a field on the charsheet currently.

I had looked into setting them into a frame or panel but I don't see options set those visible or not.

Andraax
September 15th, 2019, 12:03
Any object that inherits (directly or indirectly) from widget gets "setVisible":
https://www.fantasygrounds.com/refdoc/widget.xcp

Trenloe
September 15th, 2019, 13:01
https://www.fantasygrounds.com/refdoc/windowcontrol.xcp#setVisible

deer_buster
September 15th, 2019, 20:37
Perfect! Thanks so much. never occurred to me that was the case.