If a mouse action is performed over a layer button and the program is currently busy with some time-consuming activity such as file operations, and the user quickly moves the mouse away after the click, it happens that in the event function the immediately read mouse position is completely wrong.
Would Hollywood's architecture allow to supply the mouse coordinates from the time the event was triggered?
Layerbutton and OnMouse... events
- airsoftsoftwair
- Posts: 5461
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Layerbutton and OnMouse... events
Yes.
Code: Select all
Function p_EventControlButton(msg)
Local mousepX=MouseX()
Local mousepY=MouseY()
- airsoftsoftwair
- Posts: 5461
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Layerbutton and OnMouse... events
Ok, I see, I think I can add support for "x" and "y" fields in the table that is passed to the event callback and set them to the mouse position at the time the event occurred. Then it should be possible to get the correct coordinates at the time of the event.
Re: Layerbutton and OnMouse... events
Great, I was hoping something like that would be possible.