View Single Post
  #2  
Old 09-11-2013, 02:04 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
If you just want to change the mouse cursor, then I would recommend using the viz.mouse.setCursor command. Here is some sample code:
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:
Code:
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,texture=tex,size=50)
viz.link(viz.Mouse,quad,srcFlag=viz.WINDOW_PIXELS)
Reply With Quote