Glimmr Canvas Editor

version 1/100805 by Erik Temple

  • Home page
  • Beginning
  • Previous
  • Next



  • Chapter - Changing colors

    A parsing-object is a kind of thing. A parsing-object can be wide-open or secreted. A parsing-object is usually wide-open.

    A parsing-object has a text called the command example.

    The stroke highlight color is a parsing-object in Fake-room_x. It is secreted. The command example is "CHANGE STROKE HIGHLIGHT COLOR TO <color name>".
    The canvas background color is a parsing-object in Fake-room_x. It is secreted. The command example is "CHANGE CANVAS BACKGROUND COLOR TO <color name>". Understand "canvas color" as the canvas background color.
    The outline color is a parsing-object in Fake-room_x. It is secreted. The command example is "CHANGE CANVAS OUTLINE COLOR TO <color name>". Understand "canvas outline color" as the outline color.
    The element foreground color is a parsing-object in Fake-room_x. It is secreted. The command example is "CHANGE ELEMENT FOREGROUND COLOR TO <color name>".
    The element background color is a parsing-object in Fake-room_x. It is secreted. The command example is "CHANGE ELEMENT BACKGROUND COLOR TO <color name>".

    Changing the color of is an action applying to one thing and one value. Understand "change [any secreted thing] to [a glulx color value]" or "[any secreted thing] [a glulx color value]" as changing the color of.

    Understand "change [any secreted thing]" as a mistake ("Please provide a color name as well, e.g. CHANGE STROKE HIGHLIGHT COLOR TO G-WHITE.").

    Carry out changing the color of:
        if the noun is:
            -- stroke highlight color: change the highlight-color to the glulx color value understood;
            -- outline color: change the Canvas outline-color to the glulx color value understood;
            -- canvas background color: change the back-colour of the working window to the glulx color value understood;
            -- element foreground color: now the current element color is the glulx color value understood;
            -- element background color: now the current element background color is the glulx color value understood;
        say "The [noun] was changed to [the glulx color value understood].";
        refresh windows.

    Listing available colors is an action applying to nothing. Understand "list colors" or "colors" as listing available colors.

    Carry out listing available colors:
        say "The colors of some elements of the interface can be changed. These include [the list of secreted parsing-objects]. The canvas background color will appear in the source code output; all of the others are purely UI elements. See below for color command syntax. The available colors are:[paragraph break]";
        repeat through the Table of Common Color Values:
            say "[glulx color value entry][line break]";
        say "[line break]Available color-changing commands:[paragraph break]";
        repeat with item running through secreted parsing-objects:
            say " [command example of item][line break]"