From 51ad14db881a68722530d54b5ac799a49f11264b Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 28 Sep 2010 17:13:50 -0700 Subject: moved callback registration to class that implements it --- indra/newview/llfloatercamera.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/llfloatercamera.cpp') diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp index ad24c6534a..b4e211a38e 100644 --- a/indra/newview/llfloatercamera.cpp +++ b/indra/newview/llfloatercamera.cpp @@ -336,6 +336,9 @@ LLFloaterCamera::LLFloaterCamera(const LLSD& val) mCurrMode(CAMERA_CTRL_MODE_PAN), mPrevMode(CAMERA_CTRL_MODE_PAN) { + LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; + registrar.add("CameraPresets.ChangeView", boost::bind(&LLFloaterCamera::onClickCameraItem, _2)); + } // virtual -- cgit v1.2.3 From 01b28ddf5ddc7118bc8b2047d899aee0293a8721 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Wed, 6 Oct 2010 20:10:36 -0700 Subject: EXP-156 WIP Implement custom Skylight hints --- indra/newview/llfloatercamera.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview/llfloatercamera.cpp') diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp index b4e211a38e..be65396b0f 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 r("panel_camera_item"); @@ -294,6 +296,8 @@ LLFloaterCamera* LLFloaterCamera::findInstance() void LLFloaterCamera::onOpen(const LLSD& key) { + LLFirstUse::viewPopup(); + LLButton *anchor_panel = LLBottomTray::getInstance()->getChild("camera_btn"); setDockControl(new LLDockControl( @@ -339,6 +343,7 @@ LLFloaterCamera::LLFloaterCamera(const LLSD& val) LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; registrar.add("CameraPresets.ChangeView", boost::bind(&LLFloaterCamera::onClickCameraItem, _2)); + LLHints::registerHintTarget("view_popup", LLView::getHandle()); } // virtual -- cgit v1.2.3 From 7c256e5a13dc32af12aa5c9f90a1be040e4e64e2 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Mon, 11 Oct 2010 15:48:36 -0700 Subject: EXP-166 FIXED Front an Side Preset Views not accessible in Skylight viewer --- indra/newview/llfloatercamera.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'indra/newview/llfloatercamera.cpp') diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp index be65396b0f..620e100bdf 100644 --- a/indra/newview/llfloatercamera.cpp +++ b/indra/newview/llfloatercamera.cpp @@ -340,9 +340,6 @@ LLFloaterCamera::LLFloaterCamera(const LLSD& val) mCurrMode(CAMERA_CTRL_MODE_PAN), mPrevMode(CAMERA_CTRL_MODE_PAN) { - LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; - registrar.add("CameraPresets.ChangeView", boost::bind(&LLFloaterCamera::onClickCameraItem, _2)); - LLHints::registerHintTarget("view_popup", LLView::getHandle()); } -- cgit v1.2.3 From 6c7c124f4359b3147cd7441a2fca92a067026e11 Mon Sep 17 00:00:00 2001 From: callum Date: Tue, 12 Oct 2010 12:08:36 -0700 Subject: Viewer changes for EXP-202 Close View hint when user interacts with the View tools - pan or zoom --- indra/newview/llfloatercamera.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'indra/newview/llfloatercamera.cpp') diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp index 620e100bdf..039ae83b5e 100644 --- a/indra/newview/llfloatercamera.cpp +++ b/indra/newview/llfloatercamera.cpp @@ -75,6 +75,8 @@ protected: void onZoomPlusHeldDown(); void onZoomMinusHeldDown(); void onSliderValueChanged(); + void onCameraTrack(); + void onCameraRotate(); F32 getOrbitRate(F32 time); private: @@ -164,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() @@ -200,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 ) -- cgit v1.2.3