FreeLookManager: Use proper names for left, right, and middle click on Quartz ciface

This commit is contained in:
OatmealDome 2021-07-06 16:16:52 -04:00
parent a0ba78ded2
commit f6fabec644
1 changed files with 20 additions and 0 deletions

View File

@ -142,11 +142,17 @@ void FreeLookController::LoadDefaults(const ControllerInterface& ciface)
m_fov_buttons->SetControlExpression(FieldOfViewButtons::DecreaseY, m_fov_buttons->SetControlExpression(FieldOfViewButtons::DecreaseY,
hotkey_string({"Shift", "`Axis Z-`"})); hotkey_string({"Shift", "`Axis Z-`"}));
// Left Click
#if defined HAVE_X11 && HAVE_X11 #if defined HAVE_X11 && HAVE_X11
m_rotation_gyro->SetControlExpression(GyroButtons::PitchUp, m_rotation_gyro->SetControlExpression(GyroButtons::PitchUp,
"if(`Click 3`,`RelativeMouse Y-` * 0.10, 0)"); "if(`Click 3`,`RelativeMouse Y-` * 0.10, 0)");
m_rotation_gyro->SetControlExpression(GyroButtons::PitchDown, m_rotation_gyro->SetControlExpression(GyroButtons::PitchDown,
"if(`Click 3`,`RelativeMouse Y+` * 0.10, 0)"); "if(`Click 3`,`RelativeMouse Y+` * 0.10, 0)");
#elif __APPLE__
m_rotation_gyro->SetControlExpression(GyroButtons::PitchUp,
"if(`Left Click`,`RelativeMouse Y-` * 0.10, 0)");
m_rotation_gyro->SetControlExpression(GyroButtons::PitchDown,
"if(`Left Click`,`RelativeMouse Y+` * 0.10, 0)");
#else #else
m_rotation_gyro->SetControlExpression(GyroButtons::PitchUp, m_rotation_gyro->SetControlExpression(GyroButtons::PitchUp,
"if(`Click 1`,`RelativeMouse Y-` * 0.10, 0)"); "if(`Click 1`,`RelativeMouse Y-` * 0.10, 0)");
@ -154,16 +160,30 @@ void FreeLookController::LoadDefaults(const ControllerInterface& ciface)
"if(`Click 1`,`RelativeMouse Y+` * 0.10, 0)"); "if(`Click 1`,`RelativeMouse Y+` * 0.10, 0)");
#endif #endif
// Middle Click
#ifdef __APPLE__
m_rotation_gyro->SetControlExpression(GyroButtons::RollLeft,
"if(`Middle Click`,`RelativeMouse X-` * 0.10, 0)");
m_rotation_gyro->SetControlExpression(GyroButtons::RollRight,
"if(`Middle Click`,`RelativeMouse X+` * 0.10, 0)");
#else
m_rotation_gyro->SetControlExpression(GyroButtons::RollLeft, m_rotation_gyro->SetControlExpression(GyroButtons::RollLeft,
"if(`Click 2`,`RelativeMouse X-` * 0.10, 0)"); "if(`Click 2`,`RelativeMouse X-` * 0.10, 0)");
m_rotation_gyro->SetControlExpression(GyroButtons::RollRight, m_rotation_gyro->SetControlExpression(GyroButtons::RollRight,
"if(`Click 2`,`RelativeMouse X+` * 0.10, 0)"); "if(`Click 2`,`RelativeMouse X+` * 0.10, 0)");
#endif
// Right Click
#if defined HAVE_X11 && HAVE_X11 #if defined HAVE_X11 && HAVE_X11
m_rotation_gyro->SetControlExpression(GyroButtons::YawLeft, m_rotation_gyro->SetControlExpression(GyroButtons::YawLeft,
"if(`Click 3`,`RelativeMouse X-` * 0.10, 0)"); "if(`Click 3`,`RelativeMouse X-` * 0.10, 0)");
m_rotation_gyro->SetControlExpression(GyroButtons::YawRight, m_rotation_gyro->SetControlExpression(GyroButtons::YawRight,
"if(`Click 3`,`RelativeMouse X+` * 0.10, 0)"); "if(`Click 3`,`RelativeMouse X+` * 0.10, 0)");
#elif __APPLE__
m_rotation_gyro->SetControlExpression(GyroButtons::YawLeft,
"if(`Right Click`,`RelativeMouse X-` * 0.10, 0)");
m_rotation_gyro->SetControlExpression(GyroButtons::YawRight,
"if(`Right Click`,`RelativeMouse X+` * 0.10, 0)");
#else #else
m_rotation_gyro->SetControlExpression(GyroButtons::YawLeft, m_rotation_gyro->SetControlExpression(GyroButtons::YawLeft,
"if(`Click 1`,`RelativeMouse X-` * 0.10, 0)"); "if(`Click 1`,`RelativeMouse X-` * 0.10, 0)");