Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Lewton on Sun 04/02/2007 20:56:07

Title: Semi transparent objects in the inventory
Post by: Lewton on Sun 04/02/2007 20:56:07
I've got a problem when using png semi transparent images in the inventory,
I've found the topic to solve it
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=26847.0

But I don't know how to create this second GUI.
I'd appreciate a complete step by step explanation.
Title: Re: Semi transparent objects in the inventory
Post by: Ashen on Mon 05/02/2007 00:12:10
Which one? Creating the 'background' GUI is no different to creating any other GUI, except maybe that you won't be putting anything on it. If you need help creating/coding the 'main' GUI, you'll need to say what's going on it.

The basic steps to make a GUI are:
1. Go to the GUI editor.
2. Select the 'GUI' menu.
3. Select 'New GUI'
4. Set the size, background image, position and z-order.
5. Add objects (Buttons, Labels, etc), if needed.

All of which should be fairly self-explanatory.
Title: Re: Semi transparent objects in the inventory
Post by: Lewton on Mon 05/02/2007 15:46:43
I've created the new gui, but what do i have to do to make it appear at the same time the inventory does?
The z-order has to be superior or inferior?
Title: Re: Semi transparent objects in the inventory
Post by: Ashen on Mon 05/02/2007 15:54:18
Have you even tried?
Add a GUI.Visible = true; (with whatever the GUIs script-o-name is) line  wherever you turn the Inventory GUI on. (Possibly the show_inventory_window function?)

Lower z-ordered GUIs will be behind higher ones, so the background GUI needs to be lower than the Inventory one.
Title: Re: Semi transparent objects in the inventory
Post by: Lewton on Mon 05/02/2007 20:54:37
I've solved the problem thanks to your indications. Thanks a lot
When i use a transparent background the buttons of that gui also disappeared but they still work. I've solved it drawing the buttons in the secondary gui.
Title: Re: Semi transparent objects in the inventory
Post by: Ashen on Mon 05/02/2007 23:21:47
I think Alkis had that problem in the thread you linked. IIRR he solved it by re-importing the button images from PNGs (I think it was an alpha channel issue), but your way works too. Glad you've got it sorted.
Title: Re: Semi transparent objects in the inventory
Post by: Lewton on Tue 06/02/2007 10:52:00
Quote from: Ashen on Mon 05/02/2007 23:21:47
IIRR he solved it by re-importing the button images from PNGs (I think it was an alpha channel issue), but your way works too. Glad you've got it sorted.
I tried that first but it didn't work, maybe because I didn't use transparency in the button image.
Thanks again.