but actually the system cursor gets hidden and needs to be replaced with a user managed display.
Undocumented in manual?
However I've determined from Linux observations that indeed the MouseLocate() function is broken and it does not actually update the mouse pointer's position.
The pointer remains visible in Linux as long as ExamineMouse() function is not used.
Also while running the included code to demonstrate that problem, I noticed that a possible graphics glitch was produced.
(I did not want to post another bug report.)
Run the snippet and notice that the 2nd message: "** MOUSE POINTER SET TO 400, 300 **" does not show up.
Swap lines 10-18 with lines 20-28 and notice that the new 2nd mouse message: "** MOUSE POINTER SET TO 500, 400 **" will not display, but the old 2nd message then shows up.
This seems to be demonstrating a repeatable error.
Is it my error or the compiler's?
Code: Select all
; Demonstrates several problems including locate mouse
Global BLACK= RGB(0,0,0), GRAY= RGB(128,128,128), WHITE= RGB(255,255,255), GREEN= RGB(0,255,0)
CompilerIf #PB_Compiler_OS=#PB_OS_Linux
ExamineDesktops() : DW= DesktopWidth(0) : DH= DesktopHeight(0) : DD= DesktopDepth(0)
CompilerEndIf
LoadFont(1,"Arial",11,#PB_Font_Bold|#PB_Font_HighQuality)
If InitSprite()=0 : End : EndIf
If OpenScreen(800,600,32,"appname")=0 : End : EndIf
InitMouse() : ExamineMouse()
ClearScreen(GRAY)
StartDrawing(ScreenOutput())
DrawingFont(FontID(1))
Box(150,270,500,60,WHITE)
BUFF$= "** MOUSE POINTER AT DEFAULT **"
DrawText(200,280,BUFF$,GREEN,BLACK)
StopDrawing() : FlipBuffers()
Delay(3000)
MouseLocate(400,300)
ClearScreen(WHITE)
StartDrawing(ScreenOutput())
DrawingFont(FontID(1))
Box(150,270,500,60,GRAY)
BUFF$= "** MOUSE POINTER SET TO 400, 300 **"
DrawText(200,280,BUFF$,BLACK,GREEN)
StopDrawing() : FlipBuffers()
Delay(3000)
MouseLocate(500,400)
ClearScreen(BLACK)
StartDrawing(ScreenOutput())
DrawingFont(FontID(1))
Box(150,270,500,60,GREEN)
BUFF$= "** MOUSE POINTER SET TO 500, 400 **"
DrawText(200,280,BUFF$,WHITE,GRAY)
StopDrawing() : FlipBuffers()
Delay(3000)
CloseScreen()
CompilerIf #PB_Compiler_OS=#PB_OS_Linux
If OpenScreen(DW,DH,DD,"appname")= 0
End
EndIf
CloseScreen()
CompilerEndIf
End

