TQS Home
Trivia Quiz Shell Version 2.8 Now Available!Bot Productions Home
 
TQS 2.0

Back to Reference

HANGMAN Element

Contains the data for a location of type "HANGMAN", in which the user is presented with the Hangman game and a series of words or phrases to guess.

Syntax
<HANGMAN
  INORDER="inorder"
  REPLACEIMG="replaceimg"
  IMGPOS="imgpos"
  CHARSET="charset"
  SHOWSCORE="showscore"
  IMGBASECOLOR="imgbasecolor"
  IMGBODYCOLOR="imgbodycolor">
  ...
</HANGMAN>
Attributes
INORDER
If set to "1", the words/phrases will be presented to the user in the order that the WORD elements are listed in the file. Defaults to random order.
REPLACEIMG
TQS 2.1 If set to "1", TQS will not use its built-in hangman graphics. Instead, it will use the images specified by the child IMG elements. There must be at least two child IMG elements for this setting to take effect.

TQS 2.8 If set to "0", the built-in graphics will be used. This can be used in a location to override REPLACEIMG specified at the global level.

IMGPOS
TQS 2.1 If set to "LEFT", TQS will display the hangman graphics to the left of the word and letter table. If set to "RIGHT" or if not specified, graphics will be on the right.
CHARSET
TQS 2.1 The set of characters that the user can guess. These characters are choices in the table of letters, and all occurrences of these characters in hangman words will be replaced with a "-". The default character set is the 26-letter English alphabet, capital letters only.
SHOWSCORE
TQS 2.5 If set to "1", TQS will display score statistics for the current location, such as number tried, correct, wrong, and percent correct. Defaults to being hidden.
IMGBASECOLOR
TQS 2.8 The color to use when drawing the hangman gallows. Defaults to "white". Ignored if replacement images are specified.
IMGBODYCOLOR
TQS 2.8 The color to use when drawing the hangman body. Defaults to "red". Ignored if replacement images are specified.
Placement

The HANGMAN element must be a child of a LOC element whose TYPE attribute is set to "HANGMAN", or of the GLOBAL element when specifying settings for all HANGMAN locations.

Children

The following child elements are supported:

Remarks

In TQS 2.0, there are no global settings for the hangman location type. In versions 2.1 and later, all attributes, as well as the IMG subelements, are supported in global settings.

Regardless of the characters specified by the CHARSET attribute, only the 26 letters of the English alphabet can be selected from the letter table using the keyboard.

Note: In TQS, all special characters must be encoded using their numerical value. For example, to display the Ü character, you must use &#220; instead of &Uuml;.

Examples

<GLOBAL>
  <HANGMAN
    REPLACEIMG="1">
    <IMG SRC="hang1.gif"/>
    <IMG SRC="hang2.gif"/>
    ...
  </HANGMAN>
</GLOBAL>
<LOC TYPE="HANGMAN">
  <HANGMAN
    INORDER="1"
    IMGPOS="LEFT"
    CHARSET="ABCDEFGHIJKLMNOPQRSTUVWXYZ&#196;&#214;&#220;">
    <WORD>ICH H&#196;TTE DAS GERN</WORD>
  </HANGMAN>
</LOC>
<HANGMAN
  IMGBASECOLOR="blue"
  IMGBODYCOLOR="green">
  ...
</HANGMAN>


©2016 Bot Productions. All rights reserved.Last Updated: September 9, 2007