Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: HillBilly on Fri 13/06/2003 19:05:52

Title: Last question of the nigth (Current item thingy)
Post by: HillBilly on Fri 13/06/2003 19:05:52
I cant fix it so the thing next to the inventory button shows the last item you used... Does anybody know this?  :)

Thanks,
-Adrian
Title: Re:Last question of the nigth (Current item thingy)
Post by: Scorpiorus on Fri 13/06/2003 20:05:34
Quote from AGS manual:
You can also have the current inventory item displayed in its own button on the icon bar by creating a button on the GUI and setting its text to (INV) which stretches the item picture to the button size, or (INVNS) which draws the inventory item picture straight onto the button with no resizing. Finally, (INVSHR) , probably the best option, will draw it at actual size if it will fit, or shrink it if not.



-Cheers
Title: Re:Last question of the nigth (Current item thingy)
Post by: HillBilly on Fri 13/06/2003 21:30:20
Yeah, i've tried that... But the only thing i got then was some text at the top, and that's it.
Title: Re:Last question of the nigth (Current item thingy)
Post by: Scorpiorus on Fri 13/06/2003 21:41:46
hehe, try to guess the problem... You set it as INV, right? But it has to be (INV) See these brackets.. ;)

One day I had written it like you and even wanted to report a bug in the forums. Fortunately I had figured it out before posting... ;D

-Cheers
Title: Re:Last question of the nigth (Current item thingy)
Post by: HillBilly on Sat 14/06/2003 09:38:30
Okay, thanks. :)

Now there are only one problem; Either i get the inventory streched so incredible much, or the item will go outiside the box.  :-\
Title: Re:Last question of the nigth (Current item thingy)
Post by: Rui 'Trovatore' Pires on Sat 14/06/2003 13:14:01
The most obvious solution would be to use (INV) instead of (INVSHR) and the re-import you inventory graphic, with a considerable transparent area around them, so as to inscrease the graphic's size without stretching it.
Title: Re:Last question of the nigth (Current item thingy)
Post by: Scorpiorus on Sat 14/06/2003 13:14:19
Well, as manual states, the best option is (INVSHR) which shrinks the image only if it doesn't fit.

What are the sizes of button and item sprite respectively?

Also if you set it to shrink make sure an image sprite is the same color depth as the game itself. Because I had problems shrinking/stretching a 256-colored sprite in HiColor game.

-Cheers
Title: Re:Last question of the nigth (Current item thingy)
Post by: HillBilly on Sat 14/06/2003 13:18:10
32 x 27 is the button size, and every graphics is set to high...
Title: Re:Last question of the nigth (Current item thingy)
Post by: Scorpiorus on Sat 14/06/2003 14:15:14
The sprite size is also very important. What is the actual pixel size, btw?

And what is the game resolution?

redruM proposed a very good idea. Item sprite shouldn't have too much transparent area because stretching/shrinking is applied to the whole sprite, not only to the image visible area.
Title: Re:Last question of the nigth (Current item thingy)
Post by: HillBilly on Sun 15/06/2003 08:24:00
Its diffrent size on every inventory item...
The resulution is 640 x 400 if that's what you meant.

I dont really wanna make my graphic with a area around themself.
I like the way they look now...
Title: Re:Last question of the nigth (Current item thingy)
Post by: Rui 'Trovatore' Pires on Sun 15/06/2003 08:28:27
Quote from: HillBilly on Sun 15/06/2003 08:24:00
I dont really wanna make my graphic with a area around themself.
I like the way they look now...

You do realize that re-importing them with that transparent area around wouldn't change the actual image, right? I mean, your key would still look like your key.
And anyway, you don't have to make new graphics, just re-import them. If you deleted the original .bmp or .pcx or whatever files (which I don't reccomend, I myself always keep everything) just export your inventory's sprite slot and then add some transparent area around it.
Title: Re:Last question of the nigth (Current item thingy)
Post by: Scorpiorus on Sun 15/06/2003 12:57:54
Make a little test:

1. Draw a sprite with the size: 50x50 (draw a simple primitive like rectangle or circle, draw it as large as possible but make sure it fits in 50x50)

2. Open sprite manager, import and grab entire sprite.
Note: Import for 640x400 resolution has to be ticked!

3. Now make new inventory item; set the imported sprite.

4. Set button as (INVSHR).

See how it looks...

-Cheers
Title: Re:Last question of the nigth (Current item thingy)
Post by: HillBilly on Mon 16/06/2003 15:59:57
Yeah i tried that, and it worked better.  :)
But does that mean that all my inventory must be 50 x 50 or something about as small to fit?

Crap.

i need to make 3 items smaller then. Wich will look very stupid smaller.  :P