ItemHeight/width?!

Started by cece0808, Thu 12/01/2006 15:49:32

Previous topic - Next topic

cece0808

How can I change the sizes of slots for the inventory items?

Example:

invMain.ItemWidth = 50;
invMain.ItemHeight = 30

I found that from the manual, but I was unable to find anything like that from any script files. So where can I change the slot sizes? ???

thx!

ManicMatt

Ooh me! Me! I know that one!

I had the same problem, until someone here told me I could double left click inside the inventory GUI box and a new window would appear, and in that window you can change the dimensions!

cece0808

Yeah thx for that, but there must be a script somewhere which to edit. There are numerous other option how to manage inventory, but they all require to find that script... :P Now I need to know how to manage how many items there are per row.  ???

Khris

That isn't anywhere in the default script.
Code like this goes into the game_start-function of the global script.

To change the number of items per row, resize the inventory window to desired_items_per_row*invMain.ItemWidth
(I assume that you're using a custom inventory GUI)

cece0808

I've asked this before, but didn't receive any that good answer. So, how do you tell the game how many items per inventory row are displayed? I can't find it anywhere. From the manual, I found some instructions and scripts, but I cannot find the place in global script where to place them.

So, can someone give me step-to-step instructions HOW to change, how many items inventory displays on one row?

thx very much!

Ashen

Topics merged.

I think the answer khrismuc gave you is fairly clear, but to clarify:
You can't exactly tell AGS how many items to have per row, it's calculated internally - there are as many items per row as will fit. So, if your items are 30 pixels wide and the window is 150, there'll be 5. If it's 140, there'll be 4 and 20 pixels of space. (The same is true of how many rows there are - as many as can fit).
To change the number of items per row, change the size of the window (or the items, but that's a bit extreme).
I know what you're thinking ... Don't think that.

SMF spam blocked by CleanTalk