WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Problem Vizdlg panel draw order (https://forum.worldviz.com/showthread.php?t=3748)

Chapre 05-17-2011 04:36 AM

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.

Jeff 05-17-2011 02:29 PM

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)



All times are GMT -7. The time now is 01:32 PM.

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