Here is a demo of 3 windows (no figures / jpg+png yet), but it has an issue with background behavior I don’t understand yet. Using rant because it’s pretty long set of code to copy/paste. It has text highlighting and window toggle - on the very latest release of Flexible Windows extension.
“Flexible Windows, Three with Border”, release 1:
[rant][code]
“Flexible Windows, Three with Border” by “Community”.
The story genre is “Glulx Technical Demonstration”. The release number is 1.
[
This is all about pure Glulx, not Z-Machine.
reference:
http://docs.textadventures.co.uk/ifanswers/ifanswers.com/662/flexible-windows-background-window-always-another-inform.html
]
Include version 15/161003 of Flexible Windows by Jon Ingold.
The side window is a [text] g-window spawned by the main window.
The position of the side window is g-placeright.
The scale method of the side window is g-proportional.
The measurement of the side window is 33.
Toggling the side window is an action out of world.
Understand “side window” as toggling the side window.
Carry out toggling the side window:
if the side window is g-present:
close the side window;
otherwise:
open the side window.
The border window is a graphics g-window spawned by the side window.
The position of the border window is g-placeleft. [left of the side window, not the main window]
The scale method of the border window is g-fixed-size.
The measurement of the border window is 20.
Rule for refreshing the side window:
say “This should be indented.[line break]So should this. And now… for something completely different! The quick brown fox jumps over the lazy dog, but we are waiting on the recorded replay to confirm.”.
The background color of the side window is “#FFC786”. [Peachy]
The background color of the border window is “#607080”. [Grey/Dark Blue]
[
ToDo: Problem. The border window background does seem to get the desired color on Inform 7 build 6M62. However, the side window seems to only get the default white background.
]
After constructing the side window:
[
Related to the ToDo above, tried these commands, but no difference.
now the background color of the border window is the background color of the side window;
now the background color of the side window is the background color of the side window;
]
open the border window;
[
== Text colors / Text highlighting
Reference: https://intfiction.org/t/i7-glulx-more-than-two-different-custom-text-colors/4665/1
“Glulx doesn’t have a special style 3. It only has two custom styles.”
]
Table of User Styles (continued)
style name background color color
special-style-1 “#FF0000” “#00FFFF”
special-style-2 “#FFFF00” “#000000”
To say red reverse:
say special-style-1;
To say default letters:
say roman type;
To say highlighted letters:
say special-style-2;
To say redfox letters:
say special-style-1;
[
== Main Story Logic
]
Place is a room. “Type ‘side window’ to toggle. A border window should also appear, three windows in total. This line continues to be lengthy so that you can see how word wrapping is impacted by the toggle of the side window. The quick brown fox jumps over the lazy dog, or did he? Try going west to see letter coloring.”.
Wild West is a room, west of Place. “You made it to the [red reverse]Wild Occidental[default letters], type [highlighted letters]‘east’[default letters] to return to Place. [redfox letters]Je ne puis pas jouer avec toi, dit le renard.”
[/code][/rant]
What I don’t understand is why the background color of the side window is white. A more complicated problem I have is that if you replace the Include:
[Include version 15/161003 of Flexible Windows by Jon Ingold.]
[DEPENDENCY: Simple Graphical Window automatically includes Flexible Windows by Jon Ingold]
Include version 10/161003 of Simple Graphical Window by Emily Short.
The window splits to half size, the bottom half. With no other changes to this code.