diff options
author | Mike Antipov <mantipov@productengine.com> | 2010-02-25 17:43:51 +0200 |
---|---|---|
committer | Mike Antipov <mantipov@productengine.com> | 2010-02-25 17:43:51 +0200 |
commit | f7916bb6ca7aa6513981c9ebbd2e2491145f8f0c (patch) | |
tree | a2f4dc5ae808d52676780e60b8e5333ced1b705a | |
parent | 55f1a96dbf59b0bf1d0d87f358392f31b24741bf (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
-rw-r--r-- | indra/newview/llfloatercamera.cpp | 28 | ||||
-rw-r--r-- | indra/newview/llfloatercamera.h | 3 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_camera.xml | 18 |
3 files changed, 48 insertions, 1 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; 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 </floater.string> + <floater.string + name="orbit_mode_title"> + Orbit + </floater.string> + <floater.string + name="pan_mode_title"> + Pan + </floater.string> + <floater.string + name="avatar_view_mode_title"> + Presets + </floater.string> + <floater.string + name="free_mode_title"> + View Object + </floater.string> <panel border="false" height="110" @@ -232,7 +248,7 @@ image_selected="PushButton_Selected_Press" name="avatarview_btn" tab_stop="false" - tool_tip="See as avatar" + tool_tip="Presets" width="25"> </button> <button |