Layerbutton and OnMouse... events

Feature requests for future versions of Hollywood can be voiced here
Post Reply
Flinx
Posts: 192
Joined: Sun Feb 14, 2021 9:54 am
Location: Germany

Layerbutton and OnMouse... events

Post by Flinx »

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?
User avatar
airsoftsoftwair
Posts: 5446
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Layerbutton and OnMouse... events

Post by airsoftsoftwair »

How do you read the mouse position in the event callback? Using MouseX() and MouseY()?
Flinx
Posts: 192
Joined: Sun Feb 14, 2021 9:54 am
Location: Germany

Re: Layerbutton and OnMouse... events

Post by Flinx »

Yes.

Code: Select all

Function p_EventControlButton(msg)
	Local mousepX=MouseX()
	Local mousepY=MouseY()
User avatar
airsoftsoftwair
Posts: 5446
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Layerbutton and OnMouse... events

Post by airsoftsoftwair »

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.
Flinx
Posts: 192
Joined: Sun Feb 14, 2021 9:54 am
Location: Germany

Re: Layerbutton and OnMouse... events

Post by Flinx »

Great, I was hoping something like that would be possible.
Post Reply