Suggestion: transparent textGUI

Started by InCreator, Fri 21/01/2005 01:33:44

Previous topic - Next topic

InCreator

Well, I have suggested something similar before...

After looking through manual, I didn't manage to find any function for raw drawing a rectangle at specified opacity, neither a sprite with set transparency. Text-window gui's cannot be made transparent.

What I have tried to make, for a long time, is a text window like in the game named KGB...



Is there any way to implement a thing like this in AGS? All my tries to figure out how to make text window transparent or engineer my own textwindow function - have failed miserably.

Basically, just making text window background image transparent, would work. In higher resolution games, it also helps to make just 1 pixel black 'n' transparent grid pattern . but at 320x240, this doesn't look very good. :(

Only way I fgured out, was to put transparent OBJECT into EVERY room and enabling it whenever text is being displayed...
Well, this is way too complicated and pointless. Plus, it does not resize itsself according to the amount of text!

If there's a way to do that, any help would be appreciated.
If not - I don't believe that's too hard to implement in AGS...
if more AGS users would find such thing useful, of course.

RickJ

I haven't used it but there is the SetGUITransparency() function in V2.62.  In the upcomming V2.7 version the function is replaced with the property GUI.Transparency.

I don't know if or how this works with a text GUI.  Rui's LSL7 template overlays a GUI with an invisible background over a GUI that has a translucent/transparent GUI to achieve something similar.  I think there was something done in V2.7 to make using two separate GUI's unnecessary but I am not sure. 


InCreator

#2
QuoteI haven't used it but there is the SetGUITransparency() function in V2.62.  In the upcomming V2.7 version the function is replaced with the property GUI.Transparency.

... which, In both versions, 2.62 and 2.7b12 does not work at all, at least I didn't get it to work. Not on text windows! Most likely transparency function doesn't affect text window only, yet it works fine with other guis.

And... even if it worked? would text be transparent too?  :P

RickJ

#3
Quote
... which, In both versions, 2.62 and 2.7b12 does not work at all, at least I didn't get it to work. Not on text windows! Most likely transparency function doesn't affect text window only, yet it works fine with other guis.
Can't a text window have an invisible backgorund color (i.e. color #0)?  If so then you could probably use two gui's on as the text window and the other as the translucent background the same a LSL7 template.

Quote
And... even if it worked? would text be transparent too?
If you have been following the beta thread, I believe one of the issues discussed was the desireability of making the GUI background translucent without affecting buttons, etc.  I can't rememember how or if that was resolved.   


*** Edit
Just noticed the word SUGGESTION in your topic, I thought you were asking for ideas for a work around.   What you describe sounds like a sensible suggestion; it's intuitive to me and seems what people would expect.  Didn't mean to poo poo your suggestion, I was trying to give you some different ideas you may not have tried. 

Cheers

InCreator

No offense taken- and thank you for ideas.

At personal level, I'm happy to find any way to work around, just if it isn't too complicated. I'm working on a KGB template (interesting interaction verbs, smart pointer system and as cool inventory screen makes KGB's GUIs my favourite)... maybe even add a new (fan)game onto template later ;)

But simplifying of making such things as a suggestion?
Yeah, why not? There's hundreds of adventure games out there, and I believe that there's much more games (including LSL7 and KGB), which use similar approach... if 1994 year game can do it, why not AGS?
I guess that even something like RawDrawRectangleTransparent(x1,y1,x2,y2,color,opacity) would work perfectly here.
But it sounds much easier to have just it in the GUI editor.

Besides, it looks cool.

Pumaman

Actually, having a translucent background but non-translucent text is surprisingly difficult to implement with AGS's architecture. The best solution would be to have two GUIs as suggested, but integrating that all to display automatically with a Display() call is more difficult. I'll have a think.

SMF spam blocked by CleanTalk