squeakypants
05-04-2007 19:27:07
I'm trying to render a 2d mouse-controlled crosshair on the screen. However, regardless if I use CEGUI or Overlays, I can't get it to work. Here is my code right now (using CEGUI) in my frameListener:
I got that from here. I already have CEGUI set up. However, in that tutorial, there's nothing about actually rendering anything on the screen.
Also, all the tutorials I've found are using both buffered input and inputDevice, while I'm using unbuffered input and OIS, which complicates things further.
def frameStarted(self, frameEvent):
self.Keyboard.capture()
self.Mouse.capture()
ms = self.Mouse.getMouseState()
CEGUI.System.getSingleton().injectMouseMove(ms.X.rel * 1024, ms.Y.rel * 768)
I got that from here. I already have CEGUI set up. However, in that tutorial, there's nothing about actually rendering anything on the screen.
Also, all the tutorials I've found are using both buffered input and inputDevice, while I'm using unbuffered input and OIS, which complicates things further.