Mouse events consistency

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Joubarbe
Enthusiast
Enthusiast
Posts: 703
Joined: Wed Sep 18, 2013 11:54 am
Location: France

Mouse events consistency

Post 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?
Bitblazer
Enthusiast
Enthusiast
Posts: 761
Joined: Mon Apr 10, 2017 6:17 pm
Location: Germany
Contact:

Re: Mouse events consistency

Post 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
Post Reply