Re: Mouse with Mouse Pointer Coordinates
Posted: Tue Dec 06, 2022 8:02 pm
I don't see any meaningful executable code here that represents the features you describe.
Where is the rest of the code?
Where is the rest of the code?
http://www.purebasic.com
https://www.purebasic.fr/english/
This was not an attack, just a serious question ....Are you all like this? Don't you read the posts? Are you all so agressive?
Code: Select all
Enumeration Window
#Window
EndEnumeration
Enumeration Sprite
#Sprite_Cursor
EndEnumeration
Enumeration Font
#Font_Cursor
EndEnumeration
InitSprite()
InitMouse()
InitKeyboard()
OpenWindow(#Window, 0, 0, 960, 540, "Mouse with Mouse Pointer Coordinates", #PB_Window_ScreenCentered|#PB_Window_MinimizeGadget)
OpenWindowedScreen(WindowID(#Window), 0, 0, WindowWidth(#Window), WindowHeight(#Window))
LoadFont(#Font_Cursor, "Arial", 10)
CreateSprite(#Sprite_Cursor, 48, 48)
Repeat
Repeat
Select WindowEvent()
Case #PB_Event_None
Break
Case #PB_Event_CloseWindow
Break 2
EndSelect
ForEver
ExamineMouse()
If StartDrawing(SpriteOutput(#Sprite_Cursor))
DrawingFont(FontID(#Font_Cursor))
LineXY(0,0,20,10)
LineXY(0,0,10,20)
DrawText(0, 24, LSet(Str(MouseX())+"-"+Str(MouseY()), 11))
StopDrawing()
EndIf
ExamineKeyboard()
If KeyboardPushed(#PB_Key_All)
Break
EndIf
ClearScreen($000000)
DisplayTransparentSprite(#Sprite_Cursor, MouseX(), MouseY())
FlipBuffers()
ForEver
End