From e8e9c970461c232c56b73600cc2bf78818ae4470 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Thu, 10 Dec 2020 13:49:04 +0100 Subject: [PATCH] Fix arrows on joystick controls in phototools camera floater not showing "pressed" state --- indra/newview/llagentcamera.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index 0bd8fbfa21..6f26b1fbc2 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -1323,6 +1323,22 @@ void LLAgentCamera::updateCamera() gAgentCamera.getPanDownKey() > 0.f); // bottom } + // Phototools camera + camera_floater = LLFloaterReg::findTypedInstance("phototools_camera"); + if (camera_floater) + { + camera_floater->mRotate->setToggleState(gAgentCamera.getOrbitRightKey() > 0.f, // left + gAgentCamera.getOrbitUpKey() > 0.f, // top + gAgentCamera.getOrbitLeftKey() > 0.f, // right + gAgentCamera.getOrbitDownKey() > 0.f); // bottom + + camera_floater->mTrack->setToggleState(gAgentCamera.getPanLeftKey() > 0.f, // left + gAgentCamera.getPanUpKey() > 0.f, // top + gAgentCamera.getPanRightKey() > 0.f, // right + gAgentCamera.getPanDownKey() > 0.f); // bottom + } + // + // Handle camera movement based on keyboard. const F32 ORBIT_OVER_RATE = 90.f * DEG_TO_RAD; // radians per second const F32 ORBIT_AROUND_RATE = 90.f * DEG_TO_RAD; // radians per second