9
« on: February 14, 2007, 10:05:31 PM »
For starters, as Mnemonic said, make sure that the item cell dimensions are less than those of the area dimensions.
For example, in inventory.def you have a section:
INVENTORY_BOX
{
ITEM_WIDTH = 65
ITEM_HEIGHT = 65
SPACING = 10
SCROLL_BY = 1
HIDE_SELECTED = TRUE
AREA { 30, 12, 770, 77 }
EXCLUSIVE = FALSE
:
:
}
In thr above example, the CELL (item) width and height are both 65 pixels.
The AREA is the part of the inventory window that contains the items and in the above example it's width is 740 (770 - 30) and 65 (77 - 12). The WME engine will fit as many items in this area that fit, and spaced 10 pixels apart (because SPACING = 10). In fact, 10 items will fit (65 x 10 = 650) plus the 9 spaces in between (10 x 9 = 90) making an exact total of 740.
If you increase the are height to fit another 65 + 10 pixels (by changing 77 to 77 + 75 = 152), you can get an inventory of 10 items across by 2 items down.
You always need to be careful with the calculations as even specifying one pixel less can cause you to loose a whole column or whole row of items. In my case I ended up with an inventory of 10 x 0 items hence no items visible at all!
Hope that helps!
P.S. If you start dabbling with the ui_element images to change the window interface, you will notice a similar behaviour when the window size is not an exact multiple of the window image sizes.