WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   one panel over all windows (https://forum.worldviz.com/showthread.php?t=2892)

Andy 08-12-2010 01:14 AM

one panel over all windows
 
1 Attachment(s)
Hi, is it possible to show the vizinfo panel in front of all subwindows?

I have some subwindows and if I open the panel I can see it in all subwindows. Also the sub-windows mask the panel of the MainWindow.

A vizdlg panel is shown only on the MainWindow but it is mask by the subwindows.

My idea is to create a new subwindow, transparent without content only with the panel and then bring it in the front of all windows. Is it possible?

Thanks

Jeff 08-16-2010 04:41 PM

Your idea will work. The following code adds the info box only to a transparent window on top:
Code:

import viz
viz.go()

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

import vizinfo
info = vizinfo.add('Info box in transparent window')
info.translate(0.05,0.95)
info.alignment(vizinfo.UPPER_LEFT)

#don't add info box to MainWindow
viz.MainWindow.visible(0,viz.SCREEN)

#add a subwindow
subWindow = viz.addWindow()
subWindow.setPosition([0,1])
#dont' add info box here
subWindow.visible(0,viz.SCREEN)

#add a clearWindow that the info box appears in
clearWindow = viz.addWindow()
clearWindow.setClearMask(viz.GL_STENCIL_BUFFER_BIT)
clearWindow.setPosition([0,1])
clearWindow.setSize([1,1])


Andy 10-06-2010 06:25 AM

Hi, thanks for your answer but there is a problem, the "clearWindow" isn't transparent.
If I change the size or the position of this window (so that it doesn't overlap) I still see the environment in this "transparent" windows. Is this a bug or doesn't work the GL_STENCIL_BUFFER_BIT on my hardware?

farshizzo 10-07-2010 12:31 PM

The previous sample is incorrect. The following sample should do what you want:
Code:

import viz
viz.go()

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

#add a subwindow
subWindow = viz.addWindow()
subWindow.setPosition([0,1])

#create info box in custom scene
import vizinfo
info = vizinfo.add('Info box in transparent window')
info.translate(0.05,0.95)
info.alignment(vizinfo.UPPER_LEFT)
info_scene = viz.addScene()
info._group.parent(viz.SCREEN,info_scene)

#add a clearWindow that displays the custom scene
clearWindow = viz.addWindow(view=viz.addView(scene=info_scene))
clearWindow.setClearMask(0)
clearWindow.setPosition([0,1])
clearWindow.setSize([1,1])


rlh001 04-11-2012 05:09 AM

I have a similar problem. I want to run the main window on the 2nd screen of an extended desktop and keep the vizdlg.Panel() that I have already created on monitor 1. How can I place one item on each screen? thanks

farshizzo 04-11-2012 09:24 AM

You can change the position and size of each subwindow object so that it only appears on a specific monitor. Then you can add the panel to the desired subwindow.


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

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