diff options
author | Oz Linden <oz@lindenlab.com> | 2011-01-24 11:44:43 -0500 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2011-01-24 11:44:43 -0500 |
commit | f57aa3e83f1b4286b1d6b5cc8bca20fb924cb002 (patch) | |
tree | 12dae11397876ce10d75eeabe5b1656ea18cd6ac /indra/newview/llfloatercamera.cpp | |
parent | b429ff8ec3e1aebc60ff7f4d3376cfc8b9f2e669 (diff) | |
parent | f9b9c7a5816cf0b9627a4a50e73a663667937145 (diff) |
merge changes for i18n fixes
Diffstat (limited to 'indra/newview/llfloatercamera.cpp')
-rw-r--r-- | indra/newview/llfloatercamera.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp index ad24c6534a..1dfa904a19 100644 --- a/indra/newview/llfloatercamera.cpp +++ b/indra/newview/llfloatercamera.cpp @@ -40,6 +40,8 @@ #include "lltoolmgr.h" #include "lltoolfocus.h" #include "llslider.h" +#include "llfirstuse.h" +#include "llhints.h" static LLDefaultChildRegistry::Register<LLPanelCameraItem> r("panel_camera_item"); @@ -73,6 +75,8 @@ protected: void onZoomPlusHeldDown(); void onZoomMinusHeldDown(); void onSliderValueChanged(); + void onCameraTrack(); + void onCameraRotate(); F32 getOrbitRate(F32 time); private: @@ -162,6 +166,8 @@ LLPanelCameraZoom::LLPanelCameraZoom() mCommitCallbackRegistrar.add("Zoom.minus", boost::bind(&LLPanelCameraZoom::onZoomMinusHeldDown, this)); mCommitCallbackRegistrar.add("Zoom.plus", boost::bind(&LLPanelCameraZoom::onZoomPlusHeldDown, this)); mCommitCallbackRegistrar.add("Slider.value_changed", boost::bind(&LLPanelCameraZoom::onSliderValueChanged, this)); + mCommitCallbackRegistrar.add("Camera.track", boost::bind(&LLPanelCameraZoom::onCameraTrack, this)); + mCommitCallbackRegistrar.add("Camera.rotate", boost::bind(&LLPanelCameraZoom::onCameraRotate, this)); } BOOL LLPanelCameraZoom::postBuild() @@ -198,6 +204,18 @@ void LLPanelCameraZoom::onZoomMinusHeldDown() gAgentCamera.setOrbitOutKey(getOrbitRate(time)); } +void LLPanelCameraZoom::onCameraTrack() +{ + // EXP-202 when camera panning activated, remove the hint + LLFirstUse::viewPopup( false ); +} + +void LLPanelCameraZoom::onCameraRotate() +{ + // EXP-202 when camera rotation activated, remove the hint + LLFirstUse::viewPopup( false ); +} + F32 LLPanelCameraZoom::getOrbitRate(F32 time) { if( time < NUDGE_TIME ) @@ -294,6 +312,8 @@ LLFloaterCamera* LLFloaterCamera::findInstance() void LLFloaterCamera::onOpen(const LLSD& key) { + LLFirstUse::viewPopup(); + LLButton *anchor_panel = LLBottomTray::getInstance()->getChild<LLButton>("camera_btn"); setDockControl(new LLDockControl( @@ -336,6 +356,7 @@ LLFloaterCamera::LLFloaterCamera(const LLSD& val) mCurrMode(CAMERA_CTRL_MODE_PAN), mPrevMode(CAMERA_CTRL_MODE_PAN) { + LLHints::registerHintTarget("view_popup", LLView::getHandle()); } // virtual @@ -343,6 +364,7 @@ BOOL LLFloaterCamera::postBuild() { setIsChrome(TRUE); setTitleVisible(TRUE); // restore title visibility after chrome applying + updateTransparency(TT_ACTIVE); // force using active floater transparency (STORM-730) mRotate = getChild<LLJoystickCameraRotate>(ORBIT); mZoom = findChild<LLPanelCameraZoom>(ZOOM); |