InputManager option - mouse right click ?
by Christian · in Torque 2D Beginner · 11/18/2013 (10:32 pm) · 2 replies
Is there a way to have InputManager recognize right mouse clicks?
InputManager's dump didn't reveal a way to add a right click, although
function InputManager::onTouchDown(%this, %touchId, %worldposition) leads me to believe the %touchId may be capable of more than the default value of 0 (assuming 0 means left click)?
The PickingToy didn't seem to have a value for any particular mouse button.
The 3rd option I considered was using the inputManager::Init_Controls(%this)
and adding in an action for the right mouse:
shipcontrols.bindCmd(mouse, "1", "echo_stuff();", "echo_stuff();");
Are any of these on the right path?
InputManager's dump didn't reveal a way to add a right click, although
function InputManager::onTouchDown(%this, %touchId, %worldposition) leads me to believe the %touchId may be capable of more than the default value of 0 (assuming 0 means left click)?
The PickingToy didn't seem to have a value for any particular mouse button.
The 3rd option I considered was using the inputManager::Init_Controls(%this)
and adding in an action for the right mouse:
shipcontrols.bindCmd(mouse, "1", "echo_stuff();", "echo_stuff();");
Are any of these on the right path?
Associate Mike Lilligreen
Retired T2Der
If you are trying to add right mouse clicks to SceneObjects - that currently requires source changes. See here:
www.garagegames.com/community/forums/viewthread/135213
The input guide on the wiki also covers input event callbacks.