Colors in status bar

I’m trying to do a colored exits thing like Aotearoa. I’ve included glulx text effects by Emily Short.

Here’s my code:

[code]When play begins:
now left hand status line is “Exits: [exit list]”;
now right hand status line is “[location]”.

A room can be blocked or unblocked. A room is usually unblocked.

To say exit list:
repeat with way running through directions:
let place be the room way from the location of the player;
if place is a room:
if place is visited:
say " [italic type][way][roman type]";
otherwise if place is blocked:
say " [second custom style][way][roman type]";
otherwise:
say " [first custom style][way][roman type]".

Rule for printing the name of a direction (called the way) while constructing the status line:
choose row with a heading of the way in the Table of Abbreviation;
say “[shortcut entry]”.

Table of Abbreviation
heading shortcut
north “N”
northeast “NE”
northwest “NW”
east “E”
southeast “SE”
south “S”
southwest “SW”
west “W”
up “U”
down “D”
inside “IN”
outside “OUT”

Table of User Styles (continued)
style name color
special-style-1 “#00FF00
special-style-1 “#888888”[/code]

However, this doesn’t change the color of the status bar in the Mac IDE player or the web-interpreter produced by ‘release with an interpreter’.

For now you’ll need to also use Flexible Windows (and the extension to the User Styles table it provides.) For Quixe you’ll need a custom css file.

Glulx Text Styles also lets you do this, by altering the “Table of Status Line Styles”. (Unfortunately you have to use old-style color names rather than nice hex codes; I should update that when I get a chance.)

1 Like