WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-12-2013, 05:18 PM
saajaja saajaja is offline
Member
 
Join Date: Nov 2011
Posts: 14
Blindfolding screen, asking for input, unblindfolding.

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.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Screen Size and Scaling javadi Vizard 2 04-02-2013 05:56 PM
Pygame Screen within Vizard World VirtuallyInsane Vizard 4 02-18-2013 09:50 AM
Attach a TexQuad to pit.osgb screen Ducky Vizard 1 01-17-2013 02:57 PM
split screen honey006 Vizard 3 05-21-2009 09:57 AM
position of html-file on screen active_world Vizard 1 05-16-2008 07:24 PM


All times are GMT -7. The time now is 03:52 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC