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

Back to Reference

enableSpecialImg Function

Enables an image element to receive special rendering. Used by custom location types that wish to display state images using the same colors and antialiasing that the rest of TQS uses.


The HTML image element that should receive special rendering.

There is no return value.


TQS can display state images in the report and in menus; a custom location type can also display state images by retrieving the image URL via getStateImg and assigning it to one of its image elements.

Starting in TQS 2.8, TQS draws these state images using antialiasing and allows you to specify the colors used. However, by default this only applies to the images displayed in reports and in menus. To apply these colors to its own state images, a custom location type must call enableSpecialImg for each HTML image element it wants to use to display states. It must still set the image's source to the URL returned from getStateImg, as this tells TQS which state image to draw.

enableSpecialImg only needs to be called once per image element, not every time its src attribute is changed.


// During ONLOAD

// Later, to display a state image
myImgEl.src = getStateImg("DONE");

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