how to use #PB_Event_LeftClick

Just starting out? Need help? Post your questions and find answers here.
Motu
Posts: 17
Joined: Fri Feb 12, 2016 2:07 pm

how to use #PB_Event_LeftClick

Post by Motu »

I just don't get any events from this callback - here ist my code. Can anyone tell me what I have done wrong?:

Code: Select all

Procedure hasClicked()
 Debug "HAS clicked"
EndProcedure

; Main init function
Procedure init()
 OpenWindow(0,0,0,1000,700,"wurst")
 BindEvent(#PB_Event_LeftClick,@hasClicked(),0)
EndProcedure
; End init()

init()

User avatar
Peter
Posts: 1197
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080
Contact:

Re: how to use #PB_Event_LeftClick

Post by Peter »

Seems to be a bug?

For example PB_Event_MoveWindow works but PB_Event_LeftClick doesn't work:

Code: Select all

Procedure hasClicked()
  Debug "HAS clicked"
EndProcedure

Procedure hasMoved()
  Debug "HAS moved"
EndProcedure

Procedure init()
  OpenWindow(0, 0, 0, 1000, 700, "wurst")
  BindEvent(#PB_Event_LeftClick, @hasClicked(), 0)
  BindEvent(#PB_Event_MoveWindow, @hasMoved(), 0)
EndProcedure

init()
Greetings ... Peter
sworteu
Posts: 18
Joined: Sun Feb 07, 2016 9:49 am

Re: how to use #PB_Event_LeftClick

Post by sworteu »

Are you trying to get a left click on the window?
Post Reply