Login
Remember
IF Answers
Ask a Question

# 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?

related to an answer for: In Inform 7, how do you create a text window using Flexible Windows by Jon Ingold?

- inform7
- flexible-windows

## 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.
asked May 24 in Authoring by bg (692 points) With Flexible Windows, can I make the background color of one window always match another one? (Inform 7)

## Related questions

- In Inform 7, how do you create a text window using Flexible Windows by Jon Ingold?
- With Flexible Windows by Jon Ingold, is there a way to make the text display at the top of the window, even in Gargoyle? (Inform 7)
- How do you use a hyperlink to paste text without (in effect) pressing enter? (Flexible Windows, Inform 7)
- How do you avoid an extra line break when refreshing a window with Flexible Windows (Inform 7)?
- How to show window background color in Quixe: background color property or text background? (Flexible Windows, Inform 7)

...