Found an issue in SpiderBasic ? Please report it here !
User avatar
Niffo
 
Posts: 32
Joined: Sat Jun 16, 2018 10:30 pm

2.21B : Canvas : Mouse is not "captured" when button down

by Niffo Fri Nov 09, 2018 5:41 pm

With a CanvasGadget, The mouse is not "captured" when left button down, only on desktop (works on mobile device, at least on Android 8) :

Code: Select all
Procedure Frm_Main_DlgProc()
   Select EventGadget()
      Case 0
         Select EventType()
            Case #PB_EventType_MouseEnter
Debug "#PB_EventType_MouseEnter"
            Case #PB_EventType_MouseLeave
Debug "#PB_EventType_MouseLeave"
            Case #PB_EventType_MouseMove
Debug "#PB_EventType_MouseMove"
            Case #PB_EventType_LeftClick
Debug "#PB_EventType_LeftClick"
            Case #PB_EventType_LeftButtonUp
Debug "#PB_EventType_LeftButtonUp"
            Case #PB_EventType_LeftButtonDown
Debug "#PB_EventType_LeftButtonDown"
         EndSelect
   EndSelect
EndProcedure

OpenWindow(0, 100, 100, 300, 200, "Canvas Mouse Capture")
CanvasGadget(0, 100, 50, 100, 100, #PB_Canvas_Border)
BindEvent(#PB_Event_Gadget, @Frm_Main_DlgProc(), 0)

CompilerIf #PB_Compiler_OS <> #PB_OS_Web
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
CompilerEndIf
Return to Bugs Reports

Who is online

Users browsing this forum: No registered users and 1 guest