You know, the one that looks like this?
I’ve been looking at Jon Ingold’s Title Page extension and I thought to myself, “surely we can get closer.”
So I got closer.
Pro:
- Only redraws the bits that change – the actual menu list.
Con:
- Glulx only
- Not very extendable.
Slightly bad-in-places full code in the spoiler ↴
...it WAS a spoiler.
"Test" by Kawa
Include Basic Screen Effects by Emily Short.
Include Glulx Text Effects by Emily Short.
Include Flexible Windows by Jon Ingold.
Table of User Styles (continued)
style name reversed justification
special-style-1 true --
special-style-2 false center-justified
The splash-menu-window is a text-buffer g-window.
The main-window spawns the splash-menu-window.
The position of the splash-menu-window is g-placebelow.
The scale method of the splash-menu-window is g-fixed-size. The measurement of the splash-menu-window is 4.
The splash-prompt-window is a text-buffer g-window.
The splash-menu-window spawns the splash-prompt-window.
The position of the splash-prompt-window is g-placeleft.
The scale method of the splash-prompt-window is g-proportional. The measurement of the splash-prompt-window is 40.
The current splash option is a number that varies. The current splash option is 1.
Window-drawing rule for the splash-menu-window:
move focus to the splash-menu-window, clearing the window;
[This could be done better but so far, the output's good.]
say "[if the current splash option is 1][special-style-1][end if]START the game [roman type][line break]";
say "[if the current splash option is 2][special-style-1][end if]RESTORE a saved game [roman type][line break]";
say "[if the current splash option is 3][special-style-1][end if]QUIT the game [roman type][line break]";
Window-drawing rule for the splash-prompt-window:
move focus to the splash-prompt-window, clearing the window;
say "You may choose to:";
To show the splash screen:
clear the screen;
[I don't even know why I copypasted the Shogun credits here. Let's just claim demonstrative purposes.]
say "[line break][special-style-2]SHOGUN[line break]A Story of Japan[line break]Copyright (c) 1988 by Infocom[line break]All rights reserved.[line break]SHOGUN is a trademark of James Clavell[line break]Original Literary Work Copyright 1975 by James Clavell[line break]Licensed by Noble House Trading Limited, London.[line break]Release 292 / Serial number 890314[line break]IBM Interpreter version 6.70[roman type]";
shut down the status-window;
open up the splash-menu-window;
open up the splash-prompt-window;
while the splash-menu-window is g-present:
follow the window-drawing rules for the splash-menu-window;
let X be the chosen letter;
if X is -6: [activate this selection]
if the current splash option is:
-- 1: shut down the splash-menu-window;
-- 2:
shut down the splash-menu-window;
follow the restore the game rule;
move focus to the main-window, clearing the window;
try looking;
-- 3: stop game abruptly;
else if X is -4: [up]
if the current splash option > 1:
decrease the current splash option by 1;
else:
now the current splash option is 3;
else if X is -5: [down]
if the current splash option < 3:
increase the current splash option by 1;
else:
now the current splash option is 1;
else if X is -8 or X is 81 or X is 113: [select QUIT]
now the current splash option is 3;
open up the status-window;
move focus to the main-window, clearing the window;
When play begins:
show the splash screen;
The echo chamber is a room. "Something test-like about this place...".