summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Borovkov <iborovkov@productengine.com>2010-07-12 19:47:44 +0300
committerIgor Borovkov <iborovkov@productengine.com>2010-07-12 19:47:44 +0300
commiteb6153d2c3cb1e2105804e28f81f894873315545 (patch)
tree876595c00478e8f2fd9a6041134dcc43a498b23a
parent36d5c91f7c19d85ca07d9e96357406e74c812687 (diff)
EXT-7796 FIXED disabling/enabling presets and camera modes on switching to/from camera customize mode
Reviewed by Neal Orman at https://codereview.productengine.com/secondlife/r/732/ --HG-- branch : product-engine
-rw-r--r--indra/newview/llagent.cpp4
-rw-r--r--indra/newview/llfloatercamera.cpp14
-rw-r--r--indra/newview/llfloatercamera.h3
3 files changed, 21 insertions, 0 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 4e5fdb1219..92c2570c33 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -1785,6 +1785,8 @@ void LLAgent::endAnimationUpdateUI()
}
gAgentCamera.setLookAt(LOOKAT_TARGET_CLEAR);
+
+ LLFloaterCamera::onAvatarEditingAppearance(false);
}
//---------------------------------------------------------------------
@@ -1891,6 +1893,8 @@ void LLAgent::endAnimationUpdateUI()
{
mPauseRequest = gAgentAvatarp->requestPause();
}
+
+ LLFloaterCamera::onAvatarEditingAppearance(true);
}
if (isAgentAvatarValid())
diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp
index d6effb2b21..0fa536dfad 100644
--- a/indra/newview/llfloatercamera.cpp
+++ b/indra/newview/llfloatercamera.cpp
@@ -243,6 +243,20 @@ void LLFloaterCamera::resetCameraMode()
floater_camera->switchMode(CAMERA_CTRL_MODE_PAN);
}
+void LLFloaterCamera::onAvatarEditingAppearance(bool editing)
+{
+ LLFloaterCamera* floater_camera = LLFloaterCamera::findInstance();
+ if (!floater_camera) return;
+
+ //camera presets (rear, front, etc.)
+ floater_camera->childSetEnabled("preset_views_list", !editing);
+ floater_camera->childSetEnabled("presets_btn", !editing);
+
+ //camera modes (object view, mouselook view)
+ floater_camera->childSetEnabled("camera_modes_list", !editing);
+ floater_camera->childSetEnabled("avatarview_btn", !editing);
+}
+
void LLFloaterCamera::update()
{
ECameraControlMode mode = determineMode();
diff --git a/indra/newview/llfloatercamera.h b/indra/newview/llfloatercamera.h
index 564e38d02d..c5f8cd6db5 100644
--- a/indra/newview/llfloatercamera.h
+++ b/indra/newview/llfloatercamera.h
@@ -68,6 +68,9 @@ public:
/** resets current camera mode to orbit mode */
static void resetCameraMode();
+ /** Called when Avatar is entered/exited editing appearance mode */
+ static void onAvatarEditingAppearance(bool editing);
+
/* determines actual mode and updates ui */
void update();