summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatercamera.cpp
diff options
context:
space:
mode:
authorMike Antipov <mantipov@productengine.com>2010-02-25 17:43:51 +0200
committerMike Antipov <mantipov@productengine.com>2010-02-25 17:43:51 +0200
commitf7916bb6ca7aa6513981c9ebbd2e2491145f8f0c (patch)
treea2f4dc5ae808d52676780e60b8e5333ced1b705a /indra/newview/llfloatercamera.cpp
parent55f1a96dbf59b0bf1d0d87f358392f31b24741bf (diff)
Work on normal bug EXT-4518 (movement & camera floaters should have window titles)
-- done for Camera floater. -- also updated tooltip for Presets button --HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llfloatercamera.cpp')
-rw-r--r--indra/newview/llfloatercamera.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp
index abf60a29b4..d0188352c7 100644
--- a/indra/newview/llfloatercamera.cpp
+++ b/indra/newview/llfloatercamera.cpp
@@ -241,6 +241,7 @@ LLFloaterCamera::LLFloaterCamera(const LLSD& val)
BOOL LLFloaterCamera::postBuild()
{
setIsChrome(TRUE);
+ setTitleVisible(TRUE); // restore title visibility after chrome applying
mRotate = getChild<LLJoystickCameraRotate>(ORBIT);
mZoom = getChild<LLPanelCameraZoom>(ZOOM);
@@ -295,6 +296,31 @@ void LLFloaterCamera::setMode(ECameraControlMode mode)
updateState();
}
+void LLFloaterCamera::setModeTitle(const ECameraControlMode mode)
+{
+ std::string title;
+ switch(mode)
+ {
+ case CAMERA_CTRL_MODE_ORBIT:
+ title = getString("orbit_mode_title");
+ break;
+ case CAMERA_CTRL_MODE_PAN:
+ title = getString("pan_mode_title");
+ break;
+ case CAMERA_CTRL_MODE_AVATAR_VIEW:
+ title = getString("avatar_view_mode_title");
+ break;
+ case CAMERA_CTRL_MODE_FREE_CAMERA:
+ title = getString("free_mode_title");
+ break;
+ default:
+ // title should be provided for all modes
+ llassert(false);
+ break;
+ }
+ setTitle(title);
+}
+
void LLFloaterCamera::switchMode(ECameraControlMode mode)
{
setMode(mode);
@@ -355,6 +381,8 @@ void LLFloaterCamera::updateState()
childSetVisible(PRESETS, CAMERA_CTRL_MODE_AVATAR_VIEW == mCurrMode);
updateCameraPresetButtons();
+ setModeTitle(mCurrMode);
+
//hiding or showing the panel with controls by reshaping the floater
bool showControls = CAMERA_CTRL_MODE_FREE_CAMERA != mCurrMode;