Glulx text colour change on the fly in 6G60/6H98

I’ve sent you my hack of GTE.

Re: Gargoyle… yeah, I discovered it sets the background colour of every style, and the foreground colour. I can change foreground colours in-game, but I just want the darn background colour to be what the user set for their screen! Can I find out what that is and set the background colours of the texts to it before the virtual machine starts?

-Wade

Silly question born out of mere curiosity as an onlooker - is “transparent” a valid background colour to set for a certain style? If not, it’s looking like a good suggestion.

Before I reply, I can report some good news - a tester was using an out of date version of Glulxe. So that’s the end of my problems in interpreters which play nice - they will pick up the background colour and stick it behind my chosen fonts.

Gargoyle doesn’t play nice in this way. If the user specifies any colour, Gargoyle expects the user to specify every colour. So if the user sets just their background to green, all the fonts will still appear on blocks of white because the user didn’t get in there and say ‘I want font A on green, font B on green, font C on green,’ etc.

So after I kicked Gargoyle really hard in the shins to make myself feel better, I walked away and accepted my lot.

-Wade

Dear Onlooker -

Unfortunately transparent isn’t an option in the Glulx system we’re talking about. Basically, a background colour is defined by giving it a colour value. You can define a separate fixed background colour for each font, too - though now that I think about this, what insane person would want to do that? But I defend their right to want it if I can get my thing. And my whole thing is: I wanna change the colour of a font without having some stupid unrelated background colour attached to it. I want the font background to look like the freaking background the user asked for! Am I a nutjob?!

-Wade

An undefined background colour essentially is transparent, but apparently it’s not working correctly. A lot of things don’t work correctly in a lot of interpreters. WinGlk is one of the few implementations that are really being maintained properly currently.

Yes, the keywording in Aotearoa’s main text window uses Aaron Reed’s Keyword Interface extension, which makes use of the 2 Glulx custom styles to power keyword display. By default, Aaron’s extension assigns the styles to boldface text with blue and green color (these defaults can be easily changed, of course, if you wish). I also wrote some bridge code so that Keyword Interface was made compatible with Eric Eve’s conversation extensions. This allowed me to display conversational topics with keyword highlighting as well.

Eric’s exit lister code creates a separate Glulx window, where all the styles are available for redefinition. Inform needs the standard styles (at least most of them) for its own purposes in the main text window, but the status line can be completely customized, allowing a greater choice of colors and typefaces.

“On the fly” color changes were achieved in both cases by swapping predefined styles in and out. To my knowledge there is no way to redefine styles at runtime.

I believe that as part of Dannii’s revamping of Flexible Windows, he enabled opening and closing the main window. That would let you redefine main window styles on the fly, though at some cost (clearing the display); I think that’s how the glulx Photopia managed to change colors with each section, for example.