Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: on Thu 18/12/2003 12:24:54

Title: Inventory Items - Space between items
Post by: on Thu 18/12/2003 12:24:54
Any way to decrease the space between inventory Items in a GUI?
Title: Re:Inventory Items - Space between items
Post by: Scummbuddy on Thu 18/12/2003 14:42:19
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.
Title: Re:Inventory Items - Space between items
Post by: on Thu 18/12/2003 15:05:47
Sorry, I don't see how this can help me. I want to make the inventory items closer together by default.
Title: Re:Inventory Items - Space between items
Post by: Scorpiorus on Thu 18/12/2003 15:34:15
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