Graphical Window Sprites

version 1 by Erik Temple

  • Home page
  • Beginning
  • Previous
  • Next

  • Section: Debugging Commands

    Graphical Window Sprites provides three debugging commands. The first will, when toggled on, print a list, every turn, of all display-active sprites organized by display-layer; it will also give either the present background image and the size at which it is currently scaled in the window, or the dimensions of the grid-background and its size as currently scaled. The command is:

        sprite tracing / sprite-tracing / sprites

    Enter the command again to toggle it off.

    The two remaining debugging commands are activated only when Jeff Sheets' Graphic Links extension is included. The first provides a listing of the currently displayed hyperlinked sprites, together with the coordinates of the upper left and lower right corners of the hotlinked box and the replacement command that results from clicking. The command is:


    The final debugging command prints the coordinates corresponding to mouse input, giving them first in window coordinates and second in the coordinate system of the background. Since the background system's coordinates are calculated using scaling operations, they are approximate, but should be accurate to within about 1 pixel. To toggle coordinate display on and off, we type:


    The extension is compatible with the Permanent Debugging extension, which allows you to include debugging commands in a released version. (Inform currently allows you to save a debug version of a story file, but that file will not include multimedia resources, which is not very useful for multimedia projects). Just include the Permanent Debugging extension to turn on debugging commands in released files.