PDA

View Full Version : ORTHO image over subwindow


fabioped
09-11-2013, 09:51 AM
How can I have a image displaying on the viz.ORTHO layer over a subwindow?

I want to display a mouse cursor image on both the mainscreen ORTHO and the subwindow (addWindow) ORTHO

farshizzo
09-11-2013, 02:04 PM
If you just want to change the mouse cursor, then I would recommend using the viz.mouse.setCursor command. Here is some sample code:import win32con
import win32gui

# Use Windows wait cursor
waitCursor = win32gui.LoadCursor(0,win32con.IDC_WAIT)
viz.mouse.setCursor(waitCursor)

If you want to overlay objects on top of all windows, then you can create a fullscreen sub-window with a higher draw order, and add the objects to that. Here is an example:overlay = viz.addWindow(size=(1,1),pos=(0,1))
overlay.visible(False,viz.WORLD)
overlay.visible(False,viz.SCREEN)
overlay.drawOrder(100)
overlay.setClearMask(0)

tex = viz.addTexture('crosshair.png')
quad = viz.addTexQuad(parent=viz.ORTHO,scene=overlay,text ure=tex,size=50)
viz.link(viz.Mouse,quad,srcFlag=viz.WINDOW_PIXELS)