SWADE Playlist
  1. #1

    How do I toggle a windowinstance between visible and invisible?

    I have a number of windowinstance(s) in a list and want to turn them off and on (invisible to user or visible to user in the list). But as the windowinstance contains all the stuff in it - and does not directly support setVisible I'm not sure how to do this. Anyone know?
    Free Extension(FGU 5E): Death Indicator
    Paid Extension(FGU 5E):

  2. #2
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Newcastle, UK (for a bit)
    Posts
    28,099
    As it's a window instance within a windowlist you can use the windowlist filter functionality - maybe have an invisible flag in each window instance and use that to filter what gets shown and what doesn't?

    https://fantasygroundsunity.atlassia...st#applyFilter
    FG Con 16 Fantasy Grounds Online RPG Convention - Postponed New date To Be Confirmed.
    Register at www.fg-con.com for all the latest info.

    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  3. #3
    Quote Originally Posted by Trenloe View Post
    As it's a window instance within a windowlist you can use the windowlist filter functionality - maybe have an invisible flag in each window instance and use that to filter what gets shown and what doesn't?

    https://fantasygroundsunity.atlassia...st#applyFilter
    I'm coming at this from the DB - where I am looping over combattracker.list children which has a special DB entry that ties to another table that determines visibility for that entry. Is the ".list" a windowlist? And if so - how to I backtrack into that class when I'm actually starting with the window entry? I can experiment around but if you know a clue to point me in the right direction that can help. For instance, if I grab the combattracker.list and that generates the windowlist class then maybe I can go about listing out all the entries in a different manner than my normal DB.getChildren way of doing things (which gets me the windowinstance objects).
    Free Extension(FGU 5E): Death Indicator
    Paid Extension(FGU 5E):

  4. #4
    Quote Originally Posted by Trenloe View Post
    As it's a window instance within a windowlist you can use the windowlist filter functionality - maybe have an invisible flag in each window instance and use that to filter what gets shown and what doesn't?

    https://fantasygroundsunity.atlassia...st#applyFilter
    I'm an idiot - I'm actually doing this to get the Database record - window.list.getWindows() - I am at the windows list already. I'll look into this OnFilter thing thanks!
    Free Extension(FGU 5E): Death Indicator
    Paid Extension(FGU 5E):

  5. #5
    Ugh. This is going to take me right back to my other open question as that has to be done in ct.lua... https://www.fantasygrounds.com/forum...l=1#post557797 .. crap.
    Free Extension(FGU 5E): Death Indicator
    Paid Extension(FGU 5E):

  6. #6
    Adding the onFilter and applyFilter into the correct spots works spectacularly - exactly what I wanted thanks.

    As per my response in that other thread - still not seeing how this template reference of ct.lua will not only ever be able to be changed by one extension ever. I'm hoping I'm just wrong on that by the way.
    Free Extension(FGU 5E): Death Indicator
    Paid Extension(FGU 5E):

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
5E Character Create Playlist

Log in

Log in