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

Back to Reference

getStateImg Function

Retrieves the path of the image file used to represent a given state.

Syntax
path = getStateImg(state);
Parameters

state
The state whose image should be returned. Can be one of the following values:
"EMPTY"
The location has not been visited.
"PARTIAL"
The location has been visited but not completed.
"DONE"
The location has been completed.
"DONE100"
The location has been completed with a score of 100%.
Returns

The path of the image file is returned.

Remarks

Regardless of whether the image is the built-in state image, or a custom image set through the STATEIMG element, the returned path name includes the required path for TQS to display the image.

The functions getLocState and getCurLocState can be used to retrieve the states of locations.

Examples

myImgEl.src = getStateImg("DONE");
myImgEl.src = getStateImg(getCurLocState());


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