Flexible Windows

version 13/130803 by Jon Ingold

  • Home page
  • Beginning
  • Previous
  • Next

  •     Section: Specifying Window Type

    As mentioned above there are three types of Glulx window, text-buffer, text-grid and graphics. A text-buffer is a teletype-style stream of text (akin to the main window), a graphics screen cannot accept text but can render images, and a text-grid allows for flexible positioning of text characters using cursor-movement functions.

    There are two potential ways to define a window's type. One is to declare it to be of the appropriate kind:

        The side-window is a text-buffer g-window
        The side-window is a text-grid g-window
        The side-window is a graphics g-window

    The other way is to set the "type" property to one of g-text-buffer, g-text-grid, or g-graphics. This is useful when we can't use one of the kinds given above. For example, the "bordered g-window" kind described below can potentially be any of the three types, so it is best to simply specify it by using the property. The following statements are true (although they don't actually appear anywhere in the extension):

        The type of the main-window is g-text-buffer.
        The type of the status-window is g-text-grid.

    Window type can be changed during the game, however, it will only take effect when the window is opened.