summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatercamera.cpp
diff options
context:
space:
mode:
authorAndrew Meadows <andrew@lindenlab.com>2011-01-07 15:22:22 -0800
committerAndrew Meadows <andrew@lindenlab.com>2011-01-07 15:22:22 -0800
commitd23f7df822b6c0557f9426b5e1aa660b77aba01e (patch)
tree2e86e4ec60018beabd35a54cc18fdf322a504269 /indra/newview/llfloatercamera.cpp
parentcf64ecb41dbbdcdc3c512510c4a7ebd28c832314 (diff)
parentc132d20a7433e2d09e3521a15497f661fcbd18b8 (diff)
merge
Diffstat (limited to 'indra/newview/llfloatercamera.cpp')
-rw-r--r--indra/newview/llfloatercamera.cpp22
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);