Glulx Status Window Control

version 1/100630 by Erik Temple

  • Home page
  • Beginning
  • Previous
  • Next



  • Section: Using Glulx Status Window Control with multiple Glulx windows

    Because this extension disables the status line until we explicitly open it, care is called for in situations where we have multiple windows, such as when we are using the Simple Graphical Window or Flexible Windows extension. For example, if we want the status window to appear in the normal position when using Simple Graphical Window; that is, spanning the entire screen above the graphics window, we need to create the status window before the graphics window is created. For example:

        When play begins (this is the status window construction rule):
            set the background of the status window to colored;
            set the background color of the status window to g-light-grey;
            open the status window.

        The status window construction rule is listed before the graphics window construction rule in the when play begins rules.

    This opens the status window as normal, but with a gray background instead of reversed out type. The graphics window construction rule is provided by Simple Graphical Window, and we place our own rule before the generation of the graphics window.

    If we are going to close and reopen the status window in a situation where there are multiple windows, we likewise must be careful that we correctly recreate the order in which the windows were originally opened, or else the status window may not appear where we expect when it is reopened. For example, if we closed and then opened the status window in the default situation from Simple Graphical Window just described, the new status window would open between the main text window and the graphics window. In order to ensure that it reopens as desired, we also need to close and reopen the graphics window. Special commands are provided for this:

        close the graphics window
        open the graphics window
        reconstruct the graphics window

    The "reconstruct" phrase works in the same way that the "reconstruct the status window" phrase does, closing and then immediately opening the graphics window. These phrases work only with Simple Graphical Windows. (The "open the graphics window" phrase is the same as the "build graphics window" phrase provided by SGW.) We would use them as follows in a routine to reopen the status window:

        open the status window;
        close the graphics window;
        build graphics window;
        follow the current graphics drawing rule;

            or
        
        open the status window;
        reconstruct the graphics window;
        follow the current graphics drawing rule;
        
    Most interpreters will show a brief flicker when closing and reopening windows in this way.