From f7916bb6ca7aa6513981c9ebbd2e2491145f8f0c Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Thu, 25 Feb 2010 17:43:51 +0200 Subject: 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 --- indra/newview/llfloatercamera.cpp | 28 ++++++++++++++++++++++ indra/newview/llfloatercamera.h | 3 +++ .../skins/default/xui/en/floater_camera.xml | 18 +++++++++++++- 3 files changed, 48 insertions(+), 1 deletion(-) 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(ORBIT); mZoom = getChild(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; diff --git a/indra/newview/llfloatercamera.h b/indra/newview/llfloatercamera.h index f908ad08be..b268839165 100644 --- a/indra/newview/llfloatercamera.h +++ b/indra/newview/llfloatercamera.h @@ -100,6 +100,9 @@ private: /* sets a new mode preserving previous one and updates ui*/ void setMode(ECameraControlMode mode); + /** set title appropriate to passed mode */ + void setModeTitle(const ECameraControlMode mode); + /* updates the state (UI) according to the current mode */ void updateState(); diff --git a/indra/newview/skins/default/xui/en/floater_camera.xml b/indra/newview/skins/default/xui/en/floater_camera.xml index f69c763f78..b45e39a111 100644 --- a/indra/newview/skins/default/xui/en/floater_camera.xml +++ b/indra/newview/skins/default/xui/en/floater_camera.xml @@ -27,6 +27,22 @@ name="move_tooltip"> Move Camera Up and Down, Left and Right + + Orbit + + + Pan + + + Presets + + + View Object +