Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: AndersM on Tue 21/10/2003 10:32:30

Title: Size of inventory window
Post by: AndersM on Tue 21/10/2003 10:32:30
How do i change the settings for the inventory window?
I have used the 'SetInvDimensions(25,25);', but it only affects
the pictures in the inventory window. There is four objects on
each row, but space enough for at least 2 more on each row.
This looks like shit. Help me please.

Can I choose  the number of objects on each row somehow,
and how do i change the size of the window itself?

Title: Re:Size of inventory window
Post by: Gilbert on Tue 21/10/2003 10:40:39
Hmmm... by dragging from the corners of the inventory object in AGSedit?
Title: Re:Size of inventory window
Post by: AndersM on Tue 21/10/2003 11:01:03
I dont get it... I'm using the standard 'pop-up' inventory window, not any GUI-based window at the bottom of the screen
Title: Re:Size of inventory window
Post by: Ishmael on Tue 21/10/2003 11:20:15
Have you tried using the game.items_per_line and game.inv_displayed global variables?
Title: Re:Size of inventory window
Post by: AndersM on Tue 21/10/2003 12:20:45
No, TK. tell me about them. Where do I put them,
and how does the exact script for them look like?
Title: Re:Size of inventory window
Post by: Ishmael on Tue 21/10/2003 12:35:07
The discriptions are found in the manual, References -> global variables. But basically:

game.items_per_line defines how many inv items are displayed on one inv widow row, and
game.num_inv_displayed defines how many items total are visible in the inv window.

(it was game.num_inv_displayed...  ::))

I'm not sure if these apply on the sierra inv.... You could try. Just place the definations, like

game.items_per_line = 4;
game.num_inv_displayed = 12;

in the game_start function would set it for a 4 in a row, 3 rows set...
Title: Re:Size of inventory window
Post by: AndersM on Tue 21/10/2003 15:12:31
Thanx.

If i just write ''game.items_per_line = 6;'' it will 'fill up' with
new lines (of four objects) as the inventory fills up, right?

It does not work....

There is still only four items on each row and room for 6
Title: Re:Size of inventory window
Post by: Ishmael on Tue 21/10/2003 19:07:29
Did you set them both? As I said (I understood you use the sierra style inv that comes with AGS, not the custom one) I'm not sure if this affects the sierra inv.
Title: Re:Size of inventory window
Post by: AndersM on Tue 21/10/2003 20:43:21
It still doesn't work. I guess i'll have to make the inventory slots bigger to fill out the space...

But does anyone know how i change the size of the entire inventory-window?
Title: Re:Size of inventory window
Post by: Pumaman on Tue 21/10/2003 21:01:53
The built-in default inventory window is fixed at 4 items per line. In order to change this, you'll need to use a custom inventory I'm afraid.
Title: Re:Size of inventory window
Post by: AndersM on Tue 21/10/2003 21:09:51
How hard is that to do? I don't need buttons and so, just a frame with the inventory objects. If the cursor-circling still works, i can use the interract-hand to pic up the items, and a click outside the window closes it. Maybee. But that would probably take 12 hours to script.....