STAR TREK 2d20
  1. #1

    Programmatically adding/removing items from a windowlist

    As the title says - I want to script the addition of an item to a list that is normally added by the user.

    E.g., there is a weapons and armor list on a character sheet. The character sheet also has an inventory list. If the character has weapons and armor in his inventory, I want it to be added or removed from the weapons/armor list when the user toggles the inventory item button between "Carried" and "Equipped."

  2. #2
    There are two different ways to do this, depending on where in the interface/code. If you are in the UI where the windowlist exists and you want to add, then you use the windowlist.createWindow API. If you are adding to the data directly, you can use DB.createNode or databasenode.createChild.

    Make sure to look at the developer guide on the wiki.

    Regards,
    JPG

Thread Information

Users Browsing this Thread

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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Starfinder Playlist

Log in

Log in