Hello, and thank you for reading. Here is what I am trying to do:
1. Turn the screen black.
2. Display a popup dialog which asks for an input.
3. Turn the world back on.
Here is some code that should do that when you press the spacebar:
Code:
import viz
import vizinput
import vizact
piazza = viz.add('piazza.osgb')
viz.go()
def getInput():
# Blindfold. This isn't working.
viz.MainScene.visible(0,viz.WORLD)
viz.clearcolor(viz.SKYBLUE)
# Ask for input
input = ''
while input == '':
input = vizinput.input('Input something.')
# Unblindfold
viz.MainScene.visible(1,viz.WORLD)
viz.clearcolor(viz.BLACK)
vizact.onkeydown(' ', getInput)
However, it does not do that. Instead, it does this:
1. Ask for input.
Help would be greatly appreciated. Thank you for reading.