Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Kinoko on Mon 19/07/2004 03:00:58

Title: Transparent text window (SUGGESTION)
Post by: Kinoko on Mon 19/07/2004 03:00:58
I'm using Sierra style w/ backgrounds in my game, but for one or two functions, I need to use background-less text on screen. I made a new GUI text window and just left all the buttons and background without images, and also tried just using a fully transparent image as the background (which just registers as "no image")... I still get a black box behind the text. Is there a way around this?
Title: Re: Transparent text window
Post by: Radiant on Mon 19/07/2004 13:43:02
Yes, set the GUI's background color to zero (instead of 16 which is black)
Title: Re: Transparent text window
Post by: Kinoko on Mon 19/07/2004 13:53:06
It was already zero, and it's still black. BG colour = 0, BG image = none.
Title: Re: Transparent text window
Post by: Darth Mandarb on Mon 19/07/2004 21:28:22
I'm thinking that maybe text windows aren't set up to have nothing in them ...

Perhaps you could try using the same image for each of the border images (not background) and just make them a transparent image?  This might over-ride the border color?

Just a thought ...
Title: Re: Transparent text window
Post by: Kinoko on Tue 20/07/2004 05:29:24
Even a tranparent image will have the black box behind all the transparent parts. I suspect you're right about it just not being possible.

If CJ or someone comes across this, could you just give me some confirmation on this? If that is the way it is, would it be possible to add a work around to this in a future version of AGS?
Title: Re: Transparent text window
Post by: Radiant on Tue 20/07/2004 17:28:15
By the way i believe you can change the speech style in mid-game (it's one of the game.* variables). So that should be a suitable workaround.
Title: Re: Transparent text window
Post by: Kinoko on Wed 21/07/2004 05:48:13
You can? o_O I can't find it anywhere... am I blind?
Title: Re: Transparent text window
Post by: Bernie on Wed 21/07/2004 10:32:41
There's a normal command for it, 'SetSpeechStyle'.

From the manual:

SetSpeechStyle (new_style)

Changes the way in which speech text is displayed. This modifies the setting originally set in the editor. NEW_STYLE can be:
SPEECH_LUCASARTS     speech text over character's head
SPEECH_SIERRA        close-up portrait of character
SPEECH_SIERRABKGRND  close-up portrait + background window for text
SPEECH_FULLSCREEN    QFG4-style full screen dialog pictures

Example:
SetSpeechStyle (SPEECH_SIERRA);
Title: Re: Transparent text window
Post by: Kinoko on Fri 23/07/2004 12:05:45
Thanks for that. I'll give it a go and see how it works out. It's not my er... ideal way of doing this though, it's rather messy changing the text style mid-game SO often (and this will be often). I'd still really prefer just a way to make the background transparent...
Title: Re: Transparent text window (SUGGESTION)
Post by: Bernie on Sat 24/07/2004 15:06:09
Hmm... well, if you have a person without a talking view talk using the sierra mode, the window will not be displayed. If you let a character not in the current room talk, the text will be centered. This should work from everywhere, dialog script etc... will this help?
Title: Re: Transparent text window (SUGGESTION)
Post by: Kinoko on Tue 27/07/2004 14:16:42
I don't know... again, that's kind of messy. I really just need the ability to make a text window transparent. For now, I'll change the text style in game but I think I'll hang out for a future version of AGS with something a little more workable.
Title: Re: Transparent text window (SUGGESTION)
Post by: Mr Flibble on Tue 27/07/2004 18:48:41
As far as I can remember, the black box effect is caused by the foreground colour.

Title: Re: Transparent text window (SUGGESTION)
Post by: Kinoko on Wed 28/07/2004 01:55:33
My foreround colour is red (because I'd like red text), my background colour is 0. So that can't be it, unless you were implying that there simply -being- a foreground colour is the problem...
Title: Re: Transparent text window (SUGGESTION)
Post by: Radiant on Wed 28/07/2004 15:25:15
There's a difference between the text color, and the GUI's foreground color (the latter being a border around the GUI). I believe they may be identical for text popups, you'd ahve to check that.
Title: Re: Transparent text window (SUGGESTION)
Post by: Kinoko on Wed 28/07/2004 16:05:42
The foreground colour is what I meant, and they are identical in a text window.
Title: Re: Transparent text window (SUGGESTION)
Post by: Pumaman on Sun 01/08/2004 04:55:01
Yeah, I think this is a bug. If you specify a background colour of 0 for a text window, it comes out black rather than transparent. I'll get it fixed.
Title: Re: Transparent text window (SUGGESTION)
Post by: Kinoko on Sun 01/08/2004 06:02:59
Thanks a lot for that, it puts my mind at ease. ^_^