Glulx Input Loops

version 1/101121 by Erik Temple

  • Home page
  • Beginning
  • Previous
  • Next



  • Section - Input loop setup for char input

    The keystroke-code is a number variable.
    The keystroke is an indexed text variable.

    The null char is a number variable. The null char is usually -2147483648.

    Last input loop setup rule for a char-event when the focal event type of the current input loop is char-event (this is the basic char input setup rule):
        now keystroke-code is the null char;
        now keystroke is "";
        unless the type of the focal window of the current input loop is g-graphics:
            cancel pending line event in the focal window of the current input loop;
            request character input in the focal window of the current input loop;
        otherwise:
            say "***Warning: Attempted to get char input (input loop [italic type][current input loop][roman type]) in a graphics window ([italic type][the focal window of the current input loop][roman type])."