Inventory Item spacing (SOLVED)

Started by Matti, Sun 29/06/2008 14:15:02

Previous topic - Next topic

Matti

Is there a way to set a space between inventory items?

I searched around and the only solution I could find is to increase the itemsize, which I'm already doing. But I don't want the items to be clickable when the cursor is actually between them. The main problem is that the last item on the right side is clickable when the cursor isn't over the inventory anymore but a bit on the right of it.

Or is there a way to let the items just be clickable when the cusor is over the sprite and not within the itemwidth and -heights? That would be okay too.

Ishmael

I don't know if something like this has been added, but I know it's not that hard to work around it by writing a totally custom inventory. That is, using GUI buttons for each slot. There's a twist to getting right-click to work on them, but it's not impossible either.
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

Khris

If I understand you correctly, you've increased .ItemWidth, resulting in
|o |o |o |o |o |o |
                 ^- unwanted gap

I'd increase the sprite size while keeping the item in its center.

Matti

Quote from: KhrisMUC on Sun 29/06/2008 15:45:03I'd increase the sprite size while keeping the item in its center.

D'oh!

Thanks, Khris. I don't know why I didn't think of that.

Khris

You're welcome, it doesn't solve this issue though:
Quote from: matti on Sun 29/06/2008 14:15:02But I don't want the items to be clickable when the cursor is actually between them.

It should be possible to put another GUI above the inventory; its background image set to rectangles that cover the gaps. Make it clickable but don't react to the click.

Matti

Quote from: KhrisMUC on Sun 29/06/2008 16:43:40
You're welcome, it doesn't solve this issue though:
Quote from: matti on Sun 29/06/2008 14:15:02But I don't want the items to be clickable when the cursor is actually between them.

It should be possible to put another GUI above the inventory; its background image set to rectangles that cover the gaps. Make it clickable but don't react to the click.

Hey, that's a pretty good idea.

SMF spam blocked by CleanTalk