How do you indent text in a window using Flexible Windows by Jon Ingold? (Inform 7)

0 votes
119 views
asked May 22 in Authoring by bg (692 points)

I'm trying to indent the text in the window by changing the "indentation" entry in the Table of User styles, but it doesn't seem to affect anything. How would I do this?

Include version 15/150128 of Flexible Windows by Jon Ingold.

The side window is a 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.

Rule for refreshing the side window:
    say "This should be indented.[line break]So should this."

Table of User Styles (continued)
window (a g-window) style name (a glulx text style) background color (a text)   color (a text)  first line indentation (a number)   fixed width (a truth state) font weight (a font weight) indentation (a number)  italic (a truth state)  justification (a text justification)    relative size (a number)    reversed (a truth state)
side window --  --  --  --  --  --  10  --  --  --  --

Place is a room.

Or maybe what I'm looking for isn't technically indentation, but a margin, so the text isn't right up against the edge of the window. Is that possible?

1 Answer

0 votes
answered May 22 by Dannii (329 points)
selected May 25 by bg
 
Best answer

Some interpreters (Gargoyle most notably) don't support many text styles, including indentation.

But you can use another window to act as the margin:

The border window is a graphics g-window spawned by the side window.
The position of the border window is g-placeleft.
The scale method of the border window is g-fixed-size.
The measurement of the border window is 20.

After constructing the side window:
    open the border window;

(Also, in your User Styles table, you can leave out all the styles which you aren't modifying.)

commented May 22 by bg (692 points)
Ok, I'll do that. But indenting didn't seem to work in the Inform IDE or in Glulxe, either. I didn't even try Gargoyle.
This site is now closed.
As of 1st November 2015, this site is a read-only archive. For more information see the intfiction forum post

Welcome to IF Answers, a site for questions and answers about Interactive Fiction.

Technical questions about interactive fiction development tools such as Inform, Twine, Quest, QuestKit, Squiffy, Adrift, TADS etc. are all on-topic here.

Non-technical questions about interactive fiction are also on-topic. These questions could be about general IF design, specific games, entering the IF Comp etc.
...