The CanvasGadget and OpenGLGadget don't fire the #PB_EventType_MouseEnter and #PB_EventType_MouseLeave events while a mouse button is pressed. Is this a bug? If not, is there a way to do this across all three platforms (Windows, macOS and Linux/Qt)?
I need this because I am changing the cursor depending on the user's action in the gadget. However, if they move the cursor outside of the gadget while holding down a mouse button, the cursor changes to the default (as expected), but my code doesn't have the opportunity to change it back when they reenter the gadget because #PB_EventType_MouseEnter isn't fired.
Code: Select all
Procedure CanvasEvents()
Select EventType()
Case #PB_EventType_MouseEnter : Debug "Mouse enter"
Case #PB_EventType_MouseLeave : Debug "Mouse leave"
EndSelect
EndProcedure
OpenWindow(0, 0, 0, 320, 240, "", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
CanvasGadget(0, 0, 0, 320, 240)
BindGadgetEvent(0, @CanvasEvents())
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
Code: Select all
Procedure CanvasEvents()
Select EventType()
Case #PB_EventType_MouseEnter : Debug "Mouse enter"
Case #PB_EventType_MouseLeave : Debug "Mouse leave"
EndSelect
EndProcedure
OpenWindow(0, 0, 0, 320, 240, "", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
OpenGLGadget(0, 0, 0, 320, 240)
BindGadgetEvent(0, @CanvasEvents())
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow