Custom mouse pointer handling?

BlitzMax Forums/BlitzMax Programming/Custom mouse pointer handling?

ImaginaryHuman(Posted 2005) [#1]
I am trying to figure out how to implement a routine that handles a custom mouse pointer onscreen, which of course follows the mouse and updates nice and responsively.

Obviously the first thing you'd do is hide the default mouse pointer. And you can then read the mouse coordinates. And you could then draw an image at the mouse coordinates and flip the screen to see it. So long as the app runs at enough frames-per-second it should show the custom mouse flying around.

Well, okay, easy enough. But how would you get this custom mouse pointer to do the same thing, if

a) your main app does not run at a high framerate but you still want a fast and responsive mouse
b) you haven't got hardware interrupts in BlitzMax
c) you want the mouse to update at a fixed framerate
d) you only want to update the mouse-pointer graphic without having to do a whole entire `Flip` just to see the pointer

????????


ImaginaryHuman(Posted 2005) [#2]
Anyone?


Warren(Posted 2005) [#3]
You can't render faster than your game is rendering ... otherwise you wouldn't be in the position that you're in.

There's no way to have a hardware cursor without just using the hardware cursor. Which, really, isn't the worst idea ever. A responsive mouse cursor will make any UI seem more responsive.


ImaginaryHuman(Posted 2005) [#4]
Is there perhaps a way to change the system's hardware cursor to a different image from within BlitzMax?


DredPirateRoberts(Posted 2005) [#5]
Here is a C example how to load your own cursors

just Import the c file and make the Extern things to
call the functions. ( and change the c source to
load your own cursor pics )





ImaginaryHuman(Posted 2005) [#6]
Hmm ok thanks. I don't know C very well at all but I expect someone will find it useful.