Iventory window won't display more than one item. (SOLVED)

Started by Mugs, Thu 26/01/2006 17:25:18

Previous topic - Next topic

Mugs

I created my own GUI for the inventory. When I play the game,
the iventory window doesn't display more than one item, so
every time I pick an object up, it doesn't appear in the window.
Cool stuff I found out: Men are four times more likely to be struck by lightning than women.  Wow, really? [dirty joke] Maybe this has to do with the fact that us men have "lightning rods"? [/dirty joke]

Ashen

Sorry, but it's hard to say what the problem might be, without more details.

How big is the window, and how big are items set to? How are you adding new inventory? What about if you start with more than 1 item?

If it's just a matter of the window not being big enough, look up InvWindow.ScrollDown and InvWindow.ScrollUp.
I know what you're thinking ... Don't think that.

Mugs

Extra information:

-I've tried the ScrollingUp and Down thing
-If I start with 2 items, only the first one will appear.
-The items are small compared to the window.
-I'm adding inventory with cEgo.AddInventory(iItem);

BTW: It's not a window that pops up,  the inventory window is displayed at bottom of the screen.
Cool stuff I found out: Men are four times more likely to be struck by lightning than women.  Wow, really? [dirty joke] Maybe this has to do with the fact that us men have "lightning rods"? [/dirty joke]

Mugs

Okay I understand my problem:

My inventory items are small, but it seems that they have a huge transparent zone around them. Because of that, there's only enough room for one item.

How can I take the transparent zone off (AGS seems to be adding a zone, it's not part of the image I imported).
Cool stuff I found out: Men are four times more likely to be struck by lightning than women.  Wow, really? [dirty joke] Maybe this has to do with the fact that us men have "lightning rods"? [/dirty joke]

mwahahaha

I've made a custom inventory and for some reason the images overlap each other.  It's not a major issue but still one i'd like to fix.

Ashen

OK, I've merged these topics, as they come down to the same thing.

You need to change the Item size for the Inventory window, to match the size of the sprites. Mugs, your sprites are probably smaller than the items are set to, mwahahaha yours are bigger. You can either do this on the Properties window for the Inventory window in the GUI editor (the 'Item width:' and 'Item height:' options, by default 40 and 22 respectively), or in script using the InvWindow.ItemHeight/Width properties.
This is what I meant when I asked "how big are items set to?", sorry if that wasn't clear.

Inventory windows space items based on these settings, not the actual size of the item sprites.
I know what you're thinking ... Don't think that.

Mugs

Cool stuff I found out: Men are four times more likely to be struck by lightning than women.  Wow, really? [dirty joke] Maybe this has to do with the fact that us men have "lightning rods"? [/dirty joke]

SMF spam blocked by CleanTalk