AltClick on a button
-
Memory getting leaky again..
do we have a way to check on click for a button if the Alt/Ctrl etc keys are pressed?
-
@Lindon use a mouse broadcaster, then it's event.altDown and event.ctrDown/event.cmdDown, just like with the panel's mouse callback.
-
@Lindon add a broadcaster.
-
@Christoph-Hart said in AltClick on a button:
@Lindon add a broadcaster.
ok thanks guys -- I must spend more time with broadcasters and work out how to set them up.... unless Dave suddenly "does a video"...hint hint
-
@Lindon think of it like a collection of functions that you can add to from anywhere using method calls that also let you check whether the collection (broadcaster) is defined. super useful overall and great for modularity.
you can also make them react to certain events by calling any one of the attach methods , but that means the broadcaster needs to have the specific constructor, so one broadcaster can really be attacked to one set of events.
you can also trigger it at any time by simply calling its variable, meaning that you can pass a broadcaster to any method that requires a function,
setting them up, until recently, involved visiting the docs page again and again to remind yourself what the different constructors look like, but with the addition of the Broadcaster wizard
it is now super easy.
Once you have it set up, just call addListener from anywhere in your code to dynamically add functionality to a broadcaster. Whether in execution or code inclusion (adding new code modules).
-
@aaronventure well thanks for trying but thats as clear as mud to me...
-
@Lindon lol have you tried using it? It explains it as thoroughly as I'm physically able to and you can click on every help button to get additional information.
- Select a source type
- Add a listener
- Paste the generated code into the onInit callback.
-
@Christoph-Hart said in AltClick on a button:
@Lindon lol have you tried using it? It explains it as thoroughly as I'm physically able to and you can click on every help button to get additional information.
- Select a source type
- Add a listener
- Paste the generated code into the onInit callback.
thanks, and thanks aaron too, for the explanation - when I get some time I will take a run at it....I'm stuck in hot fix hell at the moment...