View Full Version : Detect holding down on a button?
zuilin
October 26th, 2020, 20:12
Is there any way to detect when someone is holding down on a button rather than clicking?
How about on a toolbar button in the image window?
Trenloe
October 26th, 2020, 20:15
The onButtonPress event for the control?
https://fantasygroundsunity.atlassian.net/wiki/spaces/FGU/pages/4096541/buttoncontrol#onButtonPress
zuilin
October 26th, 2020, 20:16
The onButtonPress event for the control?
https://fantasygroundsunity.atlassian.net/wiki/spaces/FGU/pages/4096541/buttoncontrol#onButtonPress
Nope. Not from my experiments. Seems to only fire on release of the button.
Trenloe
October 26th, 2020, 20:28
Try this then: https://fantasygroundsunity.atlassian.net/wiki/spaces/FGU/pages/4162011/windowcontrol#onClickDown
Moon Wizard
October 26th, 2020, 23:49
All window controls support the onClickDown and onClickRelease events. The button control also supports an onButtonPress event that corresponds to a click and release within the bounds of the button.
Remember to set the return value based on what you want FG to do. true = no further processing; nil = standard processing (including any fall through); false = skip standard processing of this control and fall through
Regards,
JPG
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.