We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Pretty self explanatory, however I am also using proscene2. Is it possible to disable the mousewheel in either proscene or processing.
Love,
Pizzagui
Answers
True
orFalse
.False
.The api does have a method which disables mouse actions completely called disableMotionAgent() but I was kinda hoping that there was some sort of implementation in Processing... I Think I'll just add an action listener to the mouse wheel and call the method whenever it's being used.
I've also looked ProScene's Scene class up and found out both disableMotionAgent() & disableMouseAgent() can do the trick.
Then I've modified keyPressed() in such a way it toggles the MouseAgent by hitting space:
if key == ' ': scene.disableMouseAgent() or scene.enableMouseAgent()
Here's latest v3.4 btW: \m/
P.S.: Just found out that MouseAgent is only the same as MotionEvent when running as desktop. #-o
I'd highly recommend you to update to proscene-3.x where motion bindings are defined in a per frame basis.
Use code like this:
frame.removeMotionBinding(processing.event.MouseEvent.WHEEL)
to disable the wheel forframe
; andscene.eyeFrame().removeMotionBinding(processing.event.MouseEvent.WHEEL)
to disable it for the eye.@nakednous, removeMotionBinding() gets rid of it permanently it seems.
W/ disableMotionAgent() we can still enableMotionAgent() later. >-)
@GoToLoop you can re-enable it with
myFrame.setMotionBinding(processing.event.MouseEvent.WHEEL, DOF1CallbackRoutine)
, e.g.,myFrame.setMotionBinding(processing.event.MouseEvent.WHEEL, "translateY")
. Please also observe that theDOF1CallbackRoutine
may be either some GenericFrame method that takes a DOF1Event or your custom routine that takes a DOF1Event.Thx, @nakednous. But I guess I'd stick w/ disableMotionAgent().
Much simpler, less headache and no parameters. :ar!