Example: creating icon menus
|
01-08-2014, 05:07 AM
(This post was last modified: 01-08-2014 05:13 AM by Han.)
Post: #9
|
|||
|
|||
RE: Example: creating icon menus
(01-08-2014 03:58 AM)The Shadow Wrote: Hi, new to the forums here. If using WAIT(-1) to detect the mouse, then it is possible to detect the mouse clicks (long vs short). When a mouse event occurs, the WAIT(-1) command returns a list whose first entry determines the mouse event type. A 3 means a click occurred and a 7 means a long-click occurred. Please note, however, that clicks cause several events. A single click will actually trigger three events: mouse down, mouse up, followed by the actual "click". A long click triggers: mouse down, mouse up, long click, and finally regular click. Thus, your mouse event handler code MUST handle the long click FIRST, and enable some sort of local flag so that it does not also trigger the extraneous click event. Below is the code to test click events and what the WAIT(-1) returns. For some strange reason (likely a bug), a long click is never generated if your first mouse event is in fact a long click! Code:
Here's how I would create the mouse handler: Code:
Graph 3D | QPI | SolveSys |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Example: creating icon menus - Han - 01-03-2014, 10:31 PM
RE: Example: creating icon menus - ArielPalazzesi - 01-03-2014, 10:46 PM
RE: Example: creating icon menus - Han - 01-04-2014, 04:45 AM
RE: Example: creating icon menus - ArielPalazzesi - 01-04-2014, 09:27 AM
RE: Example: creating icon menus - Han - 01-04-2014, 03:55 PM
RE: Example: creating icon menus - ArielPalazzesi - 01-04-2014, 07:51 PM
RE: Example: creating icon menus - Mic - 01-04-2014, 02:57 PM
RE: Example: creating icon menus - The Shadow - 01-08-2014, 03:58 AM
RE: Example: creating icon menus - Han - 01-08-2014 05:07 AM
RE: Example: creating icon menus - The Shadow - 01-08-2014, 10:14 AM
RE: Example: creating icon menus - Han - 01-08-2014, 06:20 PM
RE: Example: creating icon menus - junioratn - 10-07-2016, 07:38 PM
|
User(s) browsing this thread: 3 Guest(s)