In addition to GUI elements, you can also elicit user input with dialogue-box style prompts. Vizard has a standard start-up promt that you can use as well as several other styles of prompts.
Vizard offers a built-in start prompt that allows the user to control the modes in which a program launches. This prompt (shown below) provides a number of checkboxes and a text box although only fullscreen rendering ('Fullscreen') and stereo rendering ('Stereo') are automatically invoked if you click those boxes. The other boxes are up to you to use.

To obtain information the user selects use viz.get(<what>) in your script where <what> is one of the following flags:
|
Flag |
What is returned |
|
HMD |
0 or 1: HMD/fullscreen mode selected |
|
STEREO |
0 or 1: stereo mode selected |
|
TRACKER |
0 or 1: tracker selected |
|
OPTION1 |
0 or 1: Option 1 selected |
|
OPTION2 |
0 or 1: Option 2 selected |
|
INITMESG |
string: what the user entered in edit field |
Example:
viz.go(viz.PROMPT)
goTracker = viz.get(viz.TRACKER)
if goTracker:
print
"user selected tracking"
# add sensor device as appropriate
Use viz.ask() to create the dialogue box below. Your answer will be a 1 or a 0.

Example:
answer = viz.ask('Are you ready?')
Use viz.choose() to create a dialogue box with a pop-down menu of choices. The user's answer will be the order of their response within the array of options.

Example:
answer = viz.choose('Select...', ['one', 'two', 'three'])
Use viz.input() to get a dialogue box which elicits a string:

Example:
answer = viz.input('Enter your name:')
Display a message box to the user:

Example:
viz.message('There was no data recorded!')
Getting data from GUI elements