Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: on Wed 28/01/2004 04:52:13

Title: GUI Transparency
Post by: on Wed 28/01/2004 04:52:13
I am trying to make a semi-transparent GUI, using SetGUITransparency() which I am calling from game_start().  This works fine for the menu at the top of the screen, but doesn't seem to work for the in game text window (as set on the front page).  Why is this?

- Mark
Title: Re:GUI Transparency
Post by: Ishmael on Wed 28/01/2004 08:00:45
I think the transparency isn't included for text windows yet...
Title: Re:GUI Transparency
Post by: Darth Mandarb on Wed 28/01/2004 22:45:27
I use two GUIs when I want a transparent background in a GUI.  I use one below with just a color as the background which I then use SetGUITransparency(); on.  Then when I open the one GUI (the top one) I open the bottom one too and it sits under it with a semi-transparent effect.

like this:
(http://www.twin-design.com/thehouse/graphics/thenewgui.gif)
This is actually 2 GUIs stacked on each other.  

Problem with doing it this way is that Text windows are variable sizes.  But if there's a way to grab the size (width/height) you could probably get it to work this way by making the background of the text window invisible (no background) and placing the other GUI (with semi-transparency) beneath the text window.

You'd just have to script in a way to make the background GUI always match the size and location of the text window.  I'm sure somebody here could make it happen!

Any takers?

])]V[
Title: Re:GUI Transparency
Post by: Ishmael on Thu 29/01/2004 05:19:54
Or making a big enough, already transpearent background image for the text window...



What I mean is:

o = no pixel
x = pixel

oxoxox
xoxoxo
oxoxox
xoxoxo
oxoxox
xoxoxo

Would be 50% transpearent, me thinks.
Title: Re:GUI Transparency
Post by: Darth Mandarb on Thu 29/01/2004 06:56:28
Yeah I've tried that too TK.

The only real problem I had with that style was that some fonts get garbled and ugly sitting on it.

The method I use now looks soooooo much cleaner!

But you're right, that would work too!  And might be the only option if there's no way to do what I suggested above!
Title: Re:GUI Transparency
Post by: on Sat 31/01/2004 00:49:38
Thanks for the responses.  Looks like it can't be done then (unless there is some way of getting the text box size...) as the chequerboard transparency idea won't fit the graphic style I'm looking for (I'm heading as hi-res as possible).

Thanks for your responses, and if anyone figures out how to get textbox height/width then please post it here. :)

- Mark
Title: Re:GUI Transparency
Post by: CorCAD on Sat 31/01/2004 02:49:38
Mark,

Head over to this thread for some help on creating a custom text window. It sounds to me like this is what your looking for. I'm just beginning with AGS and I found it pretty easy to understand. If you need any help i'm sure myself or TK could help you out. I made my text window transparent just like your describing and it came out fine. I also incorporated Darth's idea of 2 GUI's with great results. Have fun.

http://www.agsforums.com/yabb/index.php?board=6;action=display;threadid=11269

CorCAD