Re: Inform: DrawStatusLine()


22 Aug 1995 13:29:21 GMT

Julian Arnold <jools@arnod.demon.co.uk> wrote:
> I'm customising the DrawStatusLine routine. Why does the routine in
> `parser' make a statusline which is one character less than the screen
> width?

I think that this is because there are interpreters that scroll the
status window when a character is printed in the last column. It would
probably be legitimate to regard these interpreters as being broken, and
go ahead and print the whole status line.

> Also, is there a reason why it prints `Score' and `Moves' at fixed
> positions rather than varying their position to fit wider/narrower
> screens?

No reason; this will be changed in the next release of the library.
Here's the status line from "Christminster":

[ DrawStatusLine width posa posb;
@split_window 1; @set_window 1; @set_cursor 1 1; style reverse;
width = 0->33;
posa = width - 26;
posb = width - 13;
spaces (width-1);
@set_cursor 1 2; PrintShortName(location);

! longest location name is 30 characters, say
if (width > 61) {
@set_cursor 1 posa; print "Score: ", sline1;
@set_cursor 1 posb; print "Moves: ", sline2;
}
if (width > 48 && width <= 61) {
@set_cursor 1 posb; print "Score: ", sline1;
}
@set_cursor 1 1; style roman; @set_window 0;
];

--
Gareth Rees