WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 11-13-2013, 06:15 AM
Frank Verberne Frank Verberne is offline
Member
 
Join Date: Mar 2008
Location: Netherlands
Posts: 148
Hi Saajaja,

The code below should do what you want. Note that the color of the screen will be skyblue instead of black (as stated in your question). Just change SKYBLUE to BLACK to change that. I think the problem is that the function you used immediately shows the input window, before drawing the scene again. By using the module viztask and schedule, you can make Vizard first draw one frame, and then do something else.

Code:
import viz
import vizinput
import vizact
import viztask

piazza = viz.add('piazza.osgb')
viz.go()

def getInput():
	# Blindfold.
	viz.MainScene.visible(0,viz.WORLD)
	viz.clearcolor(viz.SKYBLUE)
	yield viztask.waitFrame(1)
	
	# Ask for input
	input = ''
	while input == '':
		input = vizinput.input('Input something.')

	# Unblindfold.
	viz.MainScene.visible(1,viz.WORLD)
	viz.clearcolor(viz.BLACK)
	yield viztask.waitFrame(1)

def inputScreen():
	viztask.schedule(getInput)
	
vizact.onkeydown(' ', inputScreen)
Good luck!
Frank
Reply With Quote
 

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 04:57 AM.


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