Window Selectable List
This window extends the Selectable window by storing a list of selected
items. You can specify the number of items that are allowed to be stored,
the number of columns that should be displayed, and most importantly you
can add and remove items from the list, as well as accessing items in
the list by index, or retrieving the entire list.
You can choose whether duplicates are allowed to be added or not.
By default, the currently highlighted item will be returned if you don't
specify an index.
I provide additional handlers for dir4 (left) and dir6 (right), and other things if I think it's useful, which should provide you with more flexibility.
Additions will be added as I think of things that might be cool.
One thing I am looking forward to adding is allowing you to choose whether
the items "stay in place" or automatically shift themselves over to fill
in the gaps when items are removed.Usage
Copy into scripts and then start using it for your own scenes.
It is the same as any other window scripting with selectable windows.
The methods that will be of interest to you are
- add_item(item) - adds item to the list of selected items
- remove_item(item) - removes item from the list of selected items
- items - returns the list of selected items
- item(index) - returns the item located at the given index. Default is the currently highlighted item (if available)
If you can think of anything that would be nice or anything that should be changed let me know.
This post has been edited by Tsukihime: May 6 2012, 11:59 PM