Prior to the bag slot increase, I had a working mod that dynamically sized each bag based on the total number of slots. It worked and looked perfect, but the coding was a MAJOR PITA. Here's how it worked...
All slots are set to hidden.
Each initial transitional slot in a layout recieves an OnShow script to press a layout button.
For every layout, create a layout button with an OnPress script that positions every slot and sizes the parent window.
Say you want all 1-8 slot bags to be 4 x 2 and all 9-12 slot bags to be 6 x 2. Slot 0 would have an OnShow script that presses the Layout4x2 button. Slot 8 would trigger the Layout6x2 button.
With upwards of 30 slots triggering 30 buttons that then reposition 30 slots, you're looking at over 900 lines of code.
If we could do math on the height and width of an object, I'm sure I could cludge up something similar to position everything based on window resize. Problem is we haven't figured any way to do math on the comma seperated values.
|