Documentation‎ > ‎Scripts‎ > ‎Experiment Setup‎ > ‎

GuiTools.js

This script offers functions to simplify the bulky GUI code for task prompts and other text display screens. Functions include: 
  • - Display a GUI number input box with a label string next to it. 
    static function NumberBox(labelText: String, fieldText: String) 
  • - Display A GUI toggle button with a label string next to it. 
    static function NiceToggle(variable: boolean, labelText: String) 
  • - Display a set of instructions and a single button. 
    static function ShowInstructions(displayText: String, buttonText: String) 
  • - Display a set of instructions and a pair of buttons. 
    static function ShowChoice(displayText: String, button1Text: String, button2Text: String) 
  • - Display a 2D texture at the center of the screen. 
    static function ShowAtCenter(img: Texture2D) 
  • - Tell the subject to take a break. 
    static function SessionOver(sessionType: int) 
  • - Ask the experimenter if they really want to use the specified file. 
    static function OverwriteCheck(filename: String) 
  • - Display a prompt saying that the specified file was not found 
    static function FileNotFound(filename: String) 
  • - Find points in the prompt where <targetString> is present, and insert a list of targets separated by ',' and 'or'. 
    static function InsertTargetList(prompt: String, targetFolder: Array) 
  • - Read in a text file and and separate into an array of prompts. 
    static function ParsePromptFile(logReadScript: ReadLog, promptFilename: String) 

- Created ~5/2012 by DJ.
- Updated 11/20/13 by DJ - simplified for custom prompts.
- Updated 11/22/13 by DJ - comments.
Comments