summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatercamera.cpp
diff options
context:
space:
mode:
authorangela <angela@lindenlab.com>2010-02-26 16:02:33 +0800
committerangela <angela@lindenlab.com>2010-02-26 16:02:33 +0800
commit75e5441f2da7252749174db70719a78637bc4eeb (patch)
tree09f6019e2b8a9c467b884ff9e7a2ed03c7e7a2a5 /indra/newview/llfloatercamera.cpp
parente2b347c235e5fb92ef9941be57e049df4bf34168 (diff)
parent9f079954af9ca80498bf6953d65cc7e77e956f26 (diff)
merge
Diffstat (limited to 'indra/newview/llfloatercamera.cpp')
-rw-r--r--indra/newview/llfloatercamera.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp
index ecb6254f8a..abf60a29b4 100644
--- a/indra/newview/llfloatercamera.cpp
+++ b/indra/newview/llfloatercamera.cpp
@@ -354,6 +354,8 @@ void LLFloaterCamera::updateState()
childSetVisible(ZOOM, CAMERA_CTRL_MODE_AVATAR_VIEW != mCurrMode);
childSetVisible(PRESETS, CAMERA_CTRL_MODE_AVATAR_VIEW == mCurrMode);
+ updateCameraPresetButtons();
+
//hiding or showing the panel with controls by reshaping the floater
bool showControls = CAMERA_CTRL_MODE_FREE_CAMERA != mCurrMode;
if (showControls == childIsVisible(CONTROLS)) return;
@@ -384,6 +386,16 @@ void LLFloaterCamera::updateState()
}
}
+void LLFloaterCamera::updateCameraPresetButtons()
+{
+ ECameraPreset preset = (ECameraPreset) gSavedSettings.getU32("CameraPreset");
+
+ childSetValue("rear_view", preset == CAMERA_PRESET_REAR_VIEW);
+ childSetValue("group_view", preset == CAMERA_PRESET_GROUP_VIEW);
+ childSetValue("front_view", preset == CAMERA_PRESET_FRONT_VIEW);
+ childSetValue("mouselook_view", gAgent.cameraMouselook());
+}
+
void LLFloaterCamera::onClickCameraPresets(const LLSD& param)
{
std::string name = param.asString();
@@ -405,4 +417,7 @@ void LLFloaterCamera::onClickCameraPresets(const LLSD& param)
gAgent.changeCameraToMouselook();
}
+ LLFloaterCamera* camera_floater = LLFloaterCamera::findInstance();
+ if (camera_floater)
+ camera_floater->updateCameraPresetButtons();
}