Inventory Screen Layout

Started by XyloCub, Sun 14/12/2008 23:10:57

Previous topic - Next topic

XyloCub

How can I setup how the inventory items are displayed in the inventory screen? I would like them to be in 4 columns and 2 rows, but right now when the inventory is pulled up in the game, the items all overlap each other. Also, the action spot on the inventory items is very small and hard to grab. Can I increase the size of the clickable area on each item in inventory?

~XyloCub

Ghost

The best approach is to have all your inventory items of the same size. Then do the following:

Open the inventory GUI and check it's property panel. You will see the slots ItemWidth and ItemHeight; enter the size of your inventory there.

Then, set height and width of your inventory window. To have a grid of 4x2 you would enter a width of InvWidth*4 and a height of InvHeight*2. (200x100 if your items are 50x50).

Trent R

Then, import sprites that are the specified height.

For the InvGui, sprites aren't resized or clipped. The only time that happens is with the (INVSHR) (INVS) or (INV) or buttons. (Check the manual entry on Inventory for more on what I just mentioned)


~Trent
To give back to the AGS community, I can get you free, full versions of commercial software. Recently, Paint Shop Pro X, and eXPert PDF Pro 6. Please PM me for details.


Current Project: The Wanderer
On Hold: Hero of the Rune

Dualnames

1.How can I setup how the inventory items are displayed in the inventory screen?
Well, unless I'm mistaken on the properties of the inventory window, there's something that says Item height or something similar to that. Either create all your inventory item sprites to be of the same proportions or set these properties to the biggest width and height of all sprites.

3.Also, the action spot on the inventory items is very small and hard to grab. Can I increase the size of the clickable area on each item in inventory?

That means that either the inventory screen is very small or..the inventory image is very small. You can click on an inventory item,on it's non transparent area of the sprite. So that means the bigger the item the easier it will be to be clicked. However, there's an option about clicking and that is Pixel Perfect. In case you want pixel perfect to be enabled in all other aspects of game but the engine to do a more rectangular check when the inventory is open do this:

if (gInventory.Visible==true) {
SetGameOption(OPT_PIXELPERFECT,0);
}
else {
SetGameOption(OPT_PIXELPERFECT,1);
}

~XyloCub
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

SMF spam blocked by CleanTalk