EDIT: oops this should be in RGSS3 script request lol
I'm still pretty bad at coding windows, but see some "types" of windows that should exist as raw templates for others to use.
I would like the following window with at least the following class definition (or something like it)Window_Selectable_List
class Window_Selectable_List < Window_Selectable
@selected =  #the items you have selected
@data = #the options you have, generated from some other source
5 #Default required number of items before you can proceed
5 #Default number of slots that should be drawn
@selected[index] != nil #check if it's not nil
#implement drawing like this or something
for i in 0 .. max_slots
#draw the item
This is an extension of a selectable window.
When you select an item, it should be added to a list of items you have selected.
The basic menu will contain at least two windows. The first window displays the list of items you can choose. The second window displays the items you have chosen.
Pressing "confirm" in the item_list_window will add the item to the selected_list
Pressing "cancel" in the item_list_window will remove the most recently added item from the selected_list
The selected_list_window will list the items you have selected.
When you press the OK button, that will pass the list to other logic processes.
When you select an item from the selected list, that item will be removed from the list (and the other items will be shifted up if necessary)
Define a max_slots attribute that will limit how many items can be selected. Once the max has been reached, the cursor will automatically go to "OK", for convenience.
If you try to select more items, it will not work and you get the buzzer sound effect.
Define a "required" attribute which will indicate how many items you *must* have in the list before you may proceed. The "OK" button will be grayed out if the requirement is not met, and will be white when you are able to confirm.
Example usage: you're enchanting a weapon, you might select up to 3 items: the base weapon, and maybe two enchantment items. You will then press OK to confirm your selection.
Here's a quick idea of how it will function
Also, provide a basic scene that will demonstrate this functionality.
You can adapt it from any existing script as long as it does not depend on anything except the default engine.
This post has been edited by Tsukihime: Apr 30 2012, 02:34 PM