Completely omitting the status line--not just blanking it

Sorry if this is redundant. I made a good-faith effort to search first.

I’d like to forego having a status line of any sort while my game prints some pre-play text (content warning and so forth). Searching here, I found some help for blanking the status line, which led me to two approaches (“status-blank-flag” may seem familiar):

This one uses Basic Screen Effects:

The status-blank-flag is a truth state that varies.

Status-blank-flag is true.

Every turn when Status-blank-flag is true:
	clear only the status line.

This one stops the activity mentioned in the standard rules:

The status-blank-flag is a truth state that varies.

For constructing the status line when status-blank-flag is true:
	do nothing.

Status-blank-flag is true.

However, these both leave a blank status line at the top of the screen. The status line is still there. Is there a way to omit it altogether? Or is this as close as it gets?

(E: Another side effect is that the old status line sticks on restart, because I’m preventing it from printing rather than actually clearing it. I’m sure I could deal with that, but I’d rather not have it all)

1 Like

I imagine you could brute-force it and just delete this from Glulx.i6t:

    if (gg_statuswin == 0) {
        res = InitGlkWindow(GG_STATUSWIN_ROCK);
        if (res == 0) {
            statuswin_cursize = statuswin_size;
			for (sty=0: sty<style_NUMSTYLES: sty++)
				glk_stylehint_set(wintype_TextGrid, sty, stylehint_ReverseColor, 1);
            gg_statuswin =
            	glk_window_open(gg_mainwin, winmethod_Fixed + winmethod_Above,
            		statuswin_cursize, wintype_TextGrid, GG_STATUSWIN_ROCK);
        }
    }

Haven’t tested it though.

1 Like

Solution for 10.1.

Include (-
[ InitGlkWindow winrock;
return (winrock == GG_STATUSWIN_ROCK);
];
-) replacing "InitGlkWindow".

for 9.3/6M62 it’d be

Include (-
[ InitGlkWindow winrock;
return (winrock == GG_STATUSWIN_ROCK);
];
-) after "Definitions.i6t".
3 Likes

If you want to control when the window is shown, rather than removing it forever, then probably you’d need to use Flexible Windows. Which is rather complex just for this. A smaller extension could probably be created through to let you open and close the status window.

1 Like

oh interesting, I wasn’t aware of what this was really about.

Word of warning, I’ve never done anything with Inform 6. This is the first time it’s come up in the course of making my game, so I will probably understand even less than I usually do.

Phil, I wasn’t able to compile your code, but I’m sure my lack of understanding re: formatting and such played a role.

Zed, your code takes care of it! Is there a way to reinstate the status line at some point during play? Or is it completely gone (I think this might be what Dannii is getting at)?

Ha, I was actually suggesting you take that part out of Glulx.i6t altogether, but if you don’t like taking apart I6… but Zed’s code works without using a meat cleaver, so go with that :slight_smile:

1 Like

Yes, but it’d need more moving parts than my code as given, and yes, that’s what Dannii was getting at. A light switch is a harder problem than just smashing the fixture. :grinning:

2 Likes

Ah, well. I don’t think I’m ready to go that far yet. Thanks for giving it a look!

The old school Glulx Status Window Control by Erik Temple could be rehabilitated for the modern world, I presume… but it would be a lot of work for something that will become easy when GlkKit gets here.

Yeah, maybe I’ll just wait for that before doing my post-comp release

Are you using 6M62 or 10.1?

Here’s a simple fix that will open and close the status line for you:


Include
(-

[ InitStatusWindow sty;
 if (gg_statuswin == 0) {
	statuswin_cursize = statuswin_size;
	if (0) {
		for (sty=0: sty<style_NUMSTYLES: sty++)
			glk_stylehint_set(wintype_TextGrid, sty, stylehint_ReverseColor, 1);
	}
	gg_statuswin =
		glk_window_open(gg_mainwin, winmethod_Above | winmethod_Fixed, statuswin_cursize, wintype_TextGrid, GG_STATUSWIN_ROCK);
}
];
-)

To close the/-- status window:
	(- if (gg_statuswin) glk_window_close(gg_statuswin, 0); gg_statuswin = 0; -)

hiding is an action applying to nothing. Understand "hide" as hiding.
unhiding is an action applying to nothing. Understand "unhide" as unhiding.

To initialize/initialise the/-- status window:
	(- InitStatusWindow(); -)

Carry out hiding:
	close the status window;

Carry out unhiding:
	open the status window;
	
To open the/-- status window:
	initialize the status window;
	
Lab is a room.

Works on 9.3 and 10.1

(EDIT: oops I think I used more phrases than necessary.)

5 Likes

I feel like you could also just do a “wait for any key;” from the Emily Short basic screen effects extension.

Nice, Phil! I hope there’s a chance that something to the effect of “Glk Status Window Control” makes it to your I7-extensions repo.

Very nice, Phil. Thanks for working a little magic. Added!

[This is the only I6 code in this game. I got it from Phil Riley
over at intfiction.org. Use it to hide and reveal the status line:
*TRY HIDING THE STATUS LINE*
*TRY REVEALING THE STATUS LINE*]