Hidepointer is acting weird

Blitz3D Forums/Blitz3D Programming/Hidepointer is acting weird

Chroma(Posted 2006) [#1]
I'm not sure if this is a bug or not. But, when I do some code that hides the mousepointer when mousedown(2)=true, the pointer doesn't get hidden until I release mouse button 2. It doesn't hide it right away.


If Mousedown(2) = 1 then HidePointer else Showpointer



WTH?!?!


Akat(Posted 2006) [#2]
it mousedown not mousehit... try manipulating it with mousehit instead.. or else, try it with while loop instead of if..


Chroma(Posted 2006) [#3]
doesn't work with either mousedown or mousehit

i'll try the while loop and report back


Chroma(Posted 2006) [#4]
Well I can't really use While inside my main loop because it will cause an infinite loop.


GfK(Posted 2006) [#5]
I've been testing this for a short while and it seems that the mouse pointer's state (HidePointer/ShowPointer) doesn't change until there is no mouse input - i.e. MouseHit() and MouseDown(x) are all 0.

Run this code. It reports 0's and 1's as expected.
Graphics3D 800,600
While Not KeyDown(1)
	res = MouseDown(2)
	DebugLog res
	If res = 1
		HidePointer
	Else
		ShowPointer
	EndIf
Wend

Now run this code which demonstrates that the mouse pointer state is not changed until the mouse button is released.
Graphics3D 800,600
While Not KeyDown(1)
	res = MouseDown(2)
	DebugLog res
	If res = 1
		HidePointer
;	Else
;		ShowPointer
	EndIf
Wend

Tried using FlushMouse in various places and it didn't help. Also tried 'EnableDirectInput True', that didn't help either.

Probably a bug...


big10p(Posted 2006) [#6]
Yep. I remember having problems with show/hide way back. I *think* I reported it as a bug but it just got tossed in the bug bin. :/


Chroma(Posted 2006) [#7]
Thanks guys....I'll post this in the bug forums. Hopefully it's an easy fix but it's odd that it's been brought up before and this bug is still around.