Glulx Status Window Control

version 1/100630 by Erik Temple

  • Home page
  • Beginning
  • Previous
  • Next



  • Section - Phrases to set color of text grid windows

    [The background color must be set before the window is opened.]

    The status window background reversed is a truth state that varies. Status window background reversed is true.

    To set the background of the status window to be/-- reversed-out:
        now status window background reversed is true;

    To set the background of the status window to be/-- colored:
        now status window background reversed is false;

    To set the background color/colour of the/-- status window to (color - a glulx color value):
        (- StatusColor({color}); -)

    To set the background color/colour of the/-- status window to (color - a number):
        (- NStatusColor({color}); -)

    To set the text color/colour of the/-- status window to (color - a glulx color value):
        (- StatusTextColor({color}); -)

    To set the text color/colour of the/-- status window to (color - a number):
        (- NStatusTextColor({color}); -)

    Include (-

    [ StatusColor color i;
    color = ColVal(color);
    for (i = 0: i < style_NUMSTYLES : i++)
    glk_stylehint_set(wintype_TextGrid, i, stylehint_BackColor, color);
    ];

    [ NStatusColor color i;
    for (i = 0: i < style_NUMSTYLES : i++)
    glk_stylehint_set(wintype_TextGrid, i, stylehint_BackColor, color);
    ];

    [ StatusTextColor color i;
    color = ColVal(color);
    for (i = 0: i < style_NUMSTYLES : i++)
    glk_stylehint_set(wintype_TextGrid, i, stylehint_TextColor, color);
    ];

    [ NStatusTextColor color i;
    for (i = 0: i < style_NUMSTYLES : i++)
    glk_stylehint_set(wintype_TextGrid, i, stylehint_TextColor, color);
    ];

    -)