Minty23185Fresh
March 13th, 2018, 19:53
According to the WindowList page XML and Scripting Reference document, the getWindows() function (https://www.fantasygrounds.com/refdoc/windowlist.xcp#getWindows) allows an optional "visible only" argument.
The members of a WindowList are windowinstances not window controls so they don't have the <invisibility /> option. So how does one make a member of a WindowList invisible?
It looks like I could use close() with the <softclose /> option in the <windowclass> and then Interface.openWindow() to make it visible when desired. Or I could use celestian's methodology described in this thread (https://www.fantasygrounds.com/forums/showthread.php?37360-Issues-hiding-using-windowlist). Is one of them the preferred or is there possibly another methodology I've failed to ferret out?
What I am hoping to accomplish is to "generisize" the Ability Points Trackers on the 5E Character Sheet. Currently there are two trackers, for Spells and for Pact Magic. My Mystic Class extension added a tracker for Psionics. Monks have Ki points. Other classes have special abilities that could benefit from trackers for those points. I want to make it database driven so users could add their own tracker definitions for homebrew classes, so I am moving the individual tracker controls into the subwindows of a WindowList. For some classes, no trackers would be shown for other classes one of the trackers would be displayed, and for multiclass characters two or more trackers might show up.
Below is a screenshow (Preparation mode is on the left, Combat mode is on the right). In prep mode all trackers show up so that the user can set the point slots needed for their character. In Combat and standard mode only the appropriate (non-zero) trackers show up.
22628
The members of a WindowList are windowinstances not window controls so they don't have the <invisibility /> option. So how does one make a member of a WindowList invisible?
It looks like I could use close() with the <softclose /> option in the <windowclass> and then Interface.openWindow() to make it visible when desired. Or I could use celestian's methodology described in this thread (https://www.fantasygrounds.com/forums/showthread.php?37360-Issues-hiding-using-windowlist). Is one of them the preferred or is there possibly another methodology I've failed to ferret out?
What I am hoping to accomplish is to "generisize" the Ability Points Trackers on the 5E Character Sheet. Currently there are two trackers, for Spells and for Pact Magic. My Mystic Class extension added a tracker for Psionics. Monks have Ki points. Other classes have special abilities that could benefit from trackers for those points. I want to make it database driven so users could add their own tracker definitions for homebrew classes, so I am moving the individual tracker controls into the subwindows of a WindowList. For some classes, no trackers would be shown for other classes one of the trackers would be displayed, and for multiclass characters two or more trackers might show up.
Below is a screenshow (Preparation mode is on the left, Combat mode is on the right). In prep mode all trackers show up so that the user can set the point slots needed for their character. In Combat and standard mode only the appropriate (non-zero) trackers show up.
22628