WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 05-17-2011, 05:36 AM
Chapre Chapre is offline
Member
 
Join Date: Sep 2010
Posts: 36
Problem Vizdlg panel draw order

How do I draw a vizdlg panel behind other 2D object (texture quad, button) not belonging to the panel , since setting the draw order to a very low value doesn't solve the problem.
Reply With Quote
  #2  
Old 05-17-2011, 03:29 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,461
Add the 2D object to the ortho layer, that's what panels are added to. Then you can set the draw order:
Code:
import viz
import vizdlg
import vizact

viz.go()

myPanel = vizdlg.Panel(align=vizdlg.ALIGN_CENTER)
myPanel.addItem(viz.addText('A simple panel'),align=vizdlg.ALIGN_CENTER)
myPanel.addItem(viz.addCheckbox())
myPanel.addItem(viz.addSlider())
myPanel.addItem(viz.addTextbox())
viz.link(viz.CenterCenter,myPanel)

quad = viz.addTexQuad(parent=viz.ORTHO)
quad.texture(viz.addTexture('image2.jpg'))
quad.drawOrder(5)
quad.setScale([200]*3)
viz.link(viz.CenterCenter,quad)

slider = viz.addSlider()
slider.set(1)
slider.setPosition([0.5,0.2,0])

def alphaSlider(pos):
	quad.alpha(pos)

vizact.onslider(slider,alphaSlider)
Reply With Quote
Reply

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
one panel over all windows Andy Vizard 5 04-11-2012 10:24 AM
vizdlg Panel: Add and remove disbeat Vizard 2 02-08-2011 01:44 PM
vizdlg dialog components on a single panel Chapre Vizard 3 11-20-2010 03:47 PM


All times are GMT -7. The time now is 06:59 PM.


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