messy inventory [SOLVED]

Started by Buckethead, Mon 06/11/2006 09:24:18

Previous topic - Next topic

Buckethead

hi,

I have made an custom inventory. But if I take more then 2 inventory items they often are placed over each other, like this:



What can I do to clean this up?

R4L

Why don't you make it bigger? Or set the amount of inv items per line in the script (Manual.)

strazer

I think what R4L means is to increase the inventory control's "Item width" and "Item height" properties in the GUI editor.
Your problem is probably that the inventory item graphic exceeds the slot size, so the item overlaps into the other slot. So make the graphic smaller or the item slot bigger.

Ashen

Yes, you can't directly “set the amount of inv items per line”, it's worked out based on ItemWidth and the Width of the InvWindow itself. As strazer said, the most likely solution is to alter the InvWindow's Item Width and Height properties (can be done in script, or in the GUI editor). They'll need to be at least the size of the largest Item sprite you have, or you'll get that overlapping.

Of course, if your Items have very different sizes (like the blue thing and the screwdriver) you could end up with too much space between some items. If so, you might want to redraw your item sprites, to have a more standard size.
I know what you're thinking ... Don't think that.

Buckethead

Ok I changed the height. Now the 2 items indeed are too far away from each other. So what sizes should I use now? I don't exactly know what you mean with more standard.

Gilbert

How far away depends on how you drew your own sprites. One problem I see of your item sprites is that they're of drastically different in dimension, which is hard to provide an optimal value, unless you fix them to have more similar sizes.

Ashen

Yes, that's what I meant, they should all be about the same size (e.g. all the size of the blue thing, or all the size of the screwdriver). Exactly what that size should be depends on things like game resolution, GUI size, your preference, etc - I didn't mean to imply there was a standard size for Inventory Items that ALL games should stick to, just that there shouldn't a lot of variation within any one game.
I know what you're thinking ... Don't think that.

Buckethead

ah well thnx for all the help. I've changed the sizes already and it seems to work smoothly now.  :) many thnx!

SMF spam blocked by CleanTalk