Glulx Status Window Control

version 1/100630 by Erik Temple

  • Home page
  • Beginning
  • Previous
  • Next

  • Section: Opening and closing the status window

    Glulx Status Window Control turns over basic control over the status line to the author, while still allowing window-updating and other functions to be controlled by the Inform library. Once we have included Glulx Window Control, we must manually instruct Inform to open the status window (if we don't open the window, our game will have no status line):

        open the status window

    This directive can be placed just about anywhere, but will most often be placed in a "when play begins" rule.

    To control whether the status window opens above or below the main text window, we set either of these two options *before* we open the status window:

        set the status window to open above the main window
        set the status window to open below the main window

    Opening above the main window is the default, so we have no real need to specify this unless we are changing the position from below to above.

    If we want to close the status window, we write:

        close the status window

    The status window will disappear. We can bring it back again by using "open the status window" again. We can also change attributes such as whether it opens above or below the main window or whether it has a background color (see below) before opening it again. In this case, we may simply want to set new attributes and then use the phrase

        reconstruct the status window

    which opens and closes the window. So, for example, if we want to move the status window from the top to the bottom of the screen in response to some game event, we would give this sequence of phrases:

        set the status window to open below the main window;
        reconstruct the status window

    This is equivalent to writing:

        set the status window to open below the main window;
        close the status window;
        open the status window;

    Note that "set the..." phrases to change attributes of the window will not take effect until the next time the window is opened.