Glimmr Form Fields

version 1/101201 by Erik Temple

  • Home page
  • Beginning
  • Previous
  • Next

  • Section: Focusing and defocusing

    Whenever a field gains or loses focus--that is, when it becomes available for immediate player input--special rulebooks are checked. These are the "field focusing rules" and the "field defocusing rules". Both of these are object based rulebooks, so we can write things like:

        Field focusing: (applies to any field)
        Field focusing for a g-element: (applies to any field)
        Field defocusing for an input field: (applies to field of the "input field" type)
        Field defocusing for my input field: (applies to a single named field)

    Using these rules, we can make fields react visually to the player's input, such as a box changing color when the player clicks on it, and changing back when input is completed. (See the Color Picker example below.)