Cuatom Cursor Pointer

BlitzMax Forums/BlitzMax Programming/Cuatom Cursor Pointer

gameshastra(Posted 2008) [#1]
Hi,
The custom cursor module works with Maxgui but not with a single graphics application window. In our project it is required to do this. Can the code be modified for this.
Regards,
Ramesh


Brucey(Posted 2008) [#2]
If you are using a Graphics window...

use HideMouse() to make the standard pointer invisible.

and then track the mouse position with MouseX() and MouseY(), drawing your own image at that location...


ImaginaryHuman(Posted 2008) [#3]
Does anyone know what at what Hz rate the mouse position is updated? Is it independent from the Hz rate of the display?
If I do an update at 120Hz, will it be pointless?


gameshastra(Posted 2008) [#4]
HideMouse() .. is too slow.Isn't it possible to do the same with changecursor.mod
Regards


jhans0n(Posted 2008) [#5]
How is HideMouse() too slow?


Jesse(Posted 2008) [#6]
Hidemouse is not slow but to display a custom cursor from with in a blitzmax application makes it seem slow. the reason is that you have to wait for flip function to update the custom "drawimage" cursor while the mouse is updated at the rate windows is updated. the drawimage cursor will only be desplayed as fast as the rate bmax refresh rate is set and is why it seems there is a lag when displaying a custom cursor. the most effective way is to update the window cursor with a custom cursor. even then dragging items will allways have a lag relative to the bmax program screen update.
to ilustrate my point here is a little program first run it as is then run it with flip(0)



tonyg(Posted 2008) [#7]
What code are you trying?
I have MaxGUI and this works for me in 'non-GUI' mode :
Strict 
Local n:Int=0
Graphics 800,600,32
While Not KeyHit(KEY_ESCAPE)
	Cls
	SetPointer n
	Flip
	If MouseHit(1) n:+1
Wend

Can't you use the source to see how its done and then set-up your own?