Where outdoors is a region, I want the text colour and background colour to invert when moving outside. However, this doesn’t do the trick:
Table of User Styles (continued)
style name relative size color background color
normal-style -- "[if the player is in outdoors]#000000[otherwise]#ffffff[end if]" "[if the player is in outdoors]#ffffff[otherwise]#000000[end if]"
Now I imagine it’s because it doesn’t recheck how to apply [roman type] unless prompted. But in the documentation for the Glulx Text Effect at least, it isn’t clear how this is meant to be done. Any clues?
Firstly Glulx Text Effects reads the table once at the beginning of the game, so if you want to change colours later you’ll need to manually call the code. Either the individual “set PROP for STYLE to X” or call the set text styles rule to do it all again. But secondly, you can’t change the colours of existing windows, only new ones. You’d need to close and reopen it to have the changes take effect.
Or you could use the new Glk Text Formatting extension which lets you change colours on the fly, but it is only supported by Windows Glk currently (and Gargoyle when they publish a new version).
Thanks, I’ll give that a try.