Inventory Items - Space between items

Started by , Thu 18/12/2003 12:24:54

Previous topic - Next topic

Gar-ry

Any way to decrease the space between inventory Items in a GUI?

Scummbuddy

#1
Did you check the inventory functions in the manual, by any chance?

SetInvItemPic
SetInvItemPic (int inv, int sprite_slot)

Changes inventory item INV's graphic to be slot number SPRITE_SLOT from the Sprite Manager. This allows you to dynamically adjust an item's picture in the inventory window during the game.
Example:

SetInvItemPic(10,120);

will change the number 10 inventory item’s graphic, to the picture imported in slot 120 (sprite manager’s slot).


or you can mess with their spacing in a usermade inventory window.
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

Gar-ry

Sorry, I don't see how this can help me. I want to make the inventory items closer together by default.

Scorpiorus

You probably want...

SetInvDimensions (int width, int height)

Allows you to change the default width and height of the inventory item picture slots used by the Lucasarts-style inventory window. By default, the LEC inv window is made up of 40x22 pixel cells, but if all your inventory item pictures are bigger or smaller than this, you can use this function to adjust them.
Example:

SetInvDimensions(60,30);

if your inventory graphics are 60x30 pixels or smaller.

btw, it does require to tweak a bit :P

~Cheers

SMF spam blocked by CleanTalk