Page 1 of 1

Mouse events consistency

Posted: Sat Feb 26, 2022 5:17 am
by Joubarbe
Current events:

- Window: left and right up only; double click; no mouse wheel.
- Canvas: left and right up and down; double click; mouse wheel (both position and click).
- Mouse library (DirectX/OpenGL): left and right down only; no double click; mouse wheel (only position, no click).

Suggestion: add the events offered by the canvas gadget to both WindowEvent() and the Mouse library. For WindowEvent(), that would mean adding the following events: #PB_Event_LeftButtonDown, #PB_Event_LeftButtonUp, #PB_Event_RightButtonDown, #PB_Event_RightButtonUp, #PB_Event_MiddleButtonDown, #PB_Event_MiddleButtonUp and #PB_Event_MouseWheel.

Note: #PB_Event_Type_LeftClick and #PB_Event_Type_LeftButtonUp seem redundant. I guess it's just a convenience?

Re: Mouse events consistency

Posted: Sat Feb 26, 2022 11:36 am
by Bitblazer
+1
Joubarbe wrote: Sat Feb 26, 2022 5:17 amNote: #PB_Event_Type_LeftClick and #PB_Event_Type_LeftButtonUp seem redundant. I guess it's just a convenience?
Remember slide functions like the one in jhpjhp's large image viewer and drag&drop functionality - click <> buttonup
some of these Quality of Life functions require button down, enter/leave area and button up

Actually - current (pressure sensitive) touchsreen's and their wide use in mobile devices require even more events