Glulx Status Window Control

version 1/100630 by Erik Temple

  • Home page
  • Beginning
  • Previous



  • Example: * Kaleidoscope - This simple example shows how we can change the color of both the text and the background of the status window: A random color is chosen for each of these at the end of each turn, and the status window reconstructed to allow for the new colors to be displayed.

        "Kaleidoscope"

        Include Flexible Windows by Jon Ingold.
        Include Glulx Status Window Control by Erik Temple.
        
        When play begins:
            set the background of the status window to colored;
            set the background color of the status window to g-red;
            open the status window.
            
        Every turn:
            choose a random row in the Table of Common Color values;
            set the background color of the status window to the assigned number entry;
            choose a random row in the Table of Common Color values;
            set the text color of the status window to the assigned number entry;
            reconstruct the status window;
            
        The Scope is a room. "Nothing much to do here. Look around, jump, examine yourself, that kind of thing."