Changing color of status line

Hi! I’m new to inform 7 (and programming). Appreciate some guidance on how to change the background color of the status line (I know there are some older posts on it but these didn’t work for me as the extensions mentioned are not in use anymore). I am aware of the Glulx Text Styles extension but I’m not too sure how to use it. Does this work for the Quixe interpreter?

Do I change the parameters in the extension itself? I’ve tried setting a custom style called special-style-1 with just values indicated in the font color and background color columns:

Table of Status Line Styles style name (a glulx-style) justification (a text-justification) obliquity (an obliquity) indentation (a number) first-line indentation (a number) boldness (a boldness) fixed width (a fixity) relative size (a number) glulx color (a glulx color value) glulx background color (a glulx color value) special-style-1 -- -- -- -- -- -- -- g-white g-dark-gray

Not sure if I’m doing this right. If the above is correct, what should the code for inform 7 to reflect the above in my status line be?

I’ve tried:
When play begins: set status line color to...

(but intuitively I knew it wasn’t that straightforward.)

Lastly, is there a reference for color values in glulx?

Interestingly, ChatGPT was not helpful either.

Thank you.

3 Likes

I’ve never changed the color of the status line in a game, but I have changed the color of the text using ‘First custom style’ and ‘Second custom style’ before, and I think I’ve found some things you can mess with.

Here’s the code in my game Color the Truth:

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]".

Later on, I also have this:

Table of User Styles (continued)
	style name	color	
	special-style-1	"#00FF00"
	special-style-1	"#888888"

But that doesn’t really seem to do anything. Instead, I go into glkote.css (which appears when you release with interpreter):

.Style_user1 {
  font-family: 'Tangerine', serif !important; 
  font-size: 48px;
  color: red;
}

.Style_user2 {
 
}

That’s what my game already had, which you can see here:
https://media.textadventures.co.uk/games/a--yrp74OUqokRFBxODefw/Release/index.html

I tried setting the background of the special user styles like this:

.Style_user1 {
  font-family: 'Tangerine', serif !important; 
  font-size: 48px;
  color: red;
  background: #FF0000;
}

.Style_user2 {
  background: #00FF00;
}

And it changes the background of individual words in the status line, so tinkering with that might help!

2 Likes

Hi Brian, thanks. It works for the purpose you’ve intended:

But it’s not quite what I’m looking for, which is to change the colour of the entire status bar. For instance, I notice your status bar is entirely white. How did you change that?

1 Like

Honestly, the easiest thing to do is to use the Glk Text Formatting extension and Parchment rather than Quixe:

Parchment also supports Glulx Text Styles.

2 Likes

Hi Dannii, thanks for this. Why didn’t I chance upon this sooner?! Parchment worked, and you’re right - it’s a lot less of a hassle.

I just needed to change the colour code under GridWindow, e.g.:
.GridWindow {
background: #cccccc; etc

Tried to change the font colour in the status line as well, so I combined Brian’s suggestion into the style sheet, e.g.:
.Style_user1 {
color: #0000FF;
}

Hope the above helps others as well.
Really glad I don’t have to mull over this anymore. Thanks so much to the both of you!

2 Likes