Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: jamesreg on Mon 18/01/2010 00:23:55

Title: active Inventory item displaying on a gui
Post by: jamesreg on Mon 18/01/2010 00:23:55
Ok I have a gui which has my character avatars and icons and such on it I have a space on the gui I want to display the active inventory item

I have been told to create a button on the gui then in the gui text place (INVSHR)

I have done this and only get a grey button no active inventory item do I have to do something else?
Title: Re: active Inventory item displaying on a gui
Post by: Khris on Mon 18/01/2010 00:38:16
Just to make sure, you did put "(INVSHR)" as the button's text, right?

Edit: added brackets
Title: Re: active Inventory item displaying on a gui
Post by: jamesreg on Mon 18/01/2010 00:55:36
thats what I did created a button on my gui
where it says text on the side bar i put (INVSHR)
and all i get is a grey button box you can push
but nothing else no image on it or anything when
i select items
Title: Re: active Inventory item displaying on a gui
Post by: Khris on Mon 18/01/2010 01:59:00
I tested this using the default game, which has an image assigned to its (INVSHR) button.
As soon as I set the image to 0, the button wouldn't display the active item any longer.
I guess if the button's image is set to 0, all sprite drawing including pasting the item graphic is skipped and the standard button is drawn.

If you don't want any border around the item, just use a rectangle filled with magic pink (255,0,255).
Title: Re: active Inventory item displaying on a gui
Post by: jamesreg on Mon 18/01/2010 12:36:03
Great I got this to working by doing what you said I created a transparent background and placed on the button now my active inventory items
display correctly.

One more question how do I fix it to where if you click on that image later it will change to that active icon cursor?
Title: Re: active Inventory item displaying on a gui
Post by: Khris on Mon 18/01/2010 12:42:16
I have a hard time understanding your question. What seems to be the problem?
Clicking anywhere on the rectangular area of the button will change the cursor mode to Useinv / the item.

If the active area seems to be off, recheck the position of the little cross in the cursor modes' previews.
Title: Re: active Inventory item displaying on a gui
Post by: jamesreg on Mon 18/01/2010 12:45:51
Quote from: Khris on Mon 18/01/2010 12:42:16
I have a hard time understanding your question. What seems to be the problem?
Clicking anywhere on the rectangular area of the button will change the cursor mode to Useinv / the item.

If the active area seems to be off, recheck the position of the little cross in the cursor modes' previews.

I added mouse.mode(eModeUseInv); to the box

and now it works