Thread: Title Screen
View Single Post
  #2  
Old 03-29-2010, 02:59 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
If you want a simple title screen you can set the background color and add some text to the screen. When the user hits a key you can remove the text and render the world.
Code:
import viz
viz.go()

gallery = viz.add('gallery.ive')
gallery.visible(viz.OFF)

viz.clearcolor(viz.SKYBLUE)
text = viz.addText('Title Screen', parent = viz.SCREEN)
text.setPosition(0.3,0.5)

def showWorld():
	
	gallery.visible(viz.ON)
	text.remove()
	viz.clearcolor(viz.BLACK)
	
vizact.onkeydown(' ',showWorld)
If you wanted to show an image for the title sceen the following knowledge base article describes how to replace the background color with an image.

http://kb.worldviz.com/articles/813
Reply With Quote