Keyword Interface

version 8 by Aaron Reed

  • Home page
  • Beginning
  • Previous
  • Next



  • Section - Glulx Style Definitions (for Glulx only)

    Include Glulx Text Effects by Emily Short.

    The keyword emphases are keyword-color1-style, keyword-color2-style, keyword-bold-style, keyword-italics-style, keyword-fixedwidth-style, and keyword-no-style.

    The style of object-word is usually keyword-color1-style. The style of direction-word is usually keyword-color2-style. The style of topic-word is usually keyword-bold-style. The style of parser-word is usually keyword-italics-style.

    Table of User Styles (continued)
    style name  fixed width  boldness  relative size  glulx color  
    special-style-1  proportional-font  bold-weight  0  g-color1  
    special-style-2  proportional-font  bold-weight  0  g-color2  

    Table of Common Color Values (continued)
    glulx color value  assigned number   
    g-color1  255  [blue]  
    g-color2  3381555  [green]  

    To set the text style for (val - a keyword emphasis):
        if val is keyword-color1-style:
            say first custom style;
        else if val is keyword-color2-style:
            say second custom style;
        else if val is keyword-bold-style:
            say bold type;
        else if val is keyword-italics-style:
            say italic type;
        else if val is keyword-fixedwidth-style:
            say fixed letter spacing;
        else if val is keyword-no-style:
            do nothing.

    To reset styles with (val - a keyword emphasis):
        if val is keyword-fixedwidth-style:
            say variable letter spacing;
        else:
            say roman type;
        if we-are-parser-speaking is true, say as the parser.