Last question of the nigth (Current item thingy)

Started by HillBilly, Fri 13/06/2003 19:05:52

Previous topic - Next topic

HillBilly

I cant fix it so the thing next to the inventory button shows the last item you used... Does anybody know this?  :)

Thanks,
-Adrian

Scorpiorus

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

HillBilly

Yeah, i've tried that... But the only thing i got then was some text at the top, and that's it.

Scorpiorus

#3
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

HillBilly

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.  :-\

Rui 'Trovatore' Pires

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.
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

Scorpiorus

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

HillBilly

32 x 27 is the button size, and every graphics is set to high...

Scorpiorus

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.

HillBilly

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...

Rui 'Trovatore' Pires

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.
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

Scorpiorus

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

HillBilly

#12
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

SMF spam blocked by CleanTalk