I7: Overwriting the Top Line

I wish to overwrite the top line. Normally it displays the current location, score and number of turns - I want to display the current location and a text variable. Searched the documentation, didn’t find anything. How do I achieve my goal?

Check Chapter 8.3 of the documentation: “Changing the status line”.

Thanks!

That’s what’s known as the status line. You can manipulate it in various ways. Natively, you can change the text and basic composition (as per chapter 17.21, Constructing the Status Line), like so:

[code]State is a kind of value. The states are Prologue, Plot Thickens, Showdown, and Epilogue. State of the game is a state that varies.

When play begins:
now the left hand status line is “[italic type]Time: [time of day][roman type]”;
now the right hand status line is “[state of the game]”.

The Wold is a room.[/code]

There are extensions that provide greater functionality, such as Glulx Status Window Control, most of them Glulx-only.

Works well, with one exception: My right hand status line text is longer than 14 chars. Is there any easy way to display that text right-aligned, or do I have to dig much deeper?

The built-in extension Basic Screen Effects by Emily Short should be able to help you out.

Felix has the right of it. You have to use the tabular format, which looks a bit bastardized, and you’ll probably have to count the characters in order to force an adequate fit.

[code]Include Basic Screen Effects by Emily Short.

Table of Rightness
left central right
“” “” “[Player’s surroundings]”.

Rule for constructing the status line:
fill status bar with Table of Rightness;
rule succeeds.

When play begins:
now right alignment depth is number of characters in the printed name of the location;
now the left hand status line is “”.

The long-winded name is a room. The printed name is “An area with a deucedly long name”.[/code]

Whoah… Works! And I learned what a table is! :slight_smile:

Thanks all!