From ebb492089498450d858126bce35fecf09e62324d Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 28 Sep 2010 17:13:24 -0700 Subject: added xui param to turn off drag-and-drop reordering of bottom tray buttons --- indra/newview/llbottomtray.cpp | 52 +++++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 24 deletions(-) (limited to 'indra/newview/llbottomtray.cpp') diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 33d006578d..b5fa198bae 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -65,31 +65,42 @@ LLDefaultChildRegistry::Register bottomtray_button("bottomtr // virtual BOOL LLBottomtrayButton::handleHover(S32 x, S32 y, MASK mask) { - S32 screenX, screenY; - localPointToScreen(x, y, &screenX, &screenY); - // pass hover to bottomtray - LLBottomTray::getInstance()->onDraggableButtonHover(screenX, screenY); - return FALSE; + if (mCanDrag) + { + S32 screenX, screenY; + localPointToScreen(x, y, &screenX, &screenY); + // pass hover to bottomtray + LLBottomTray::getInstance()->onDraggableButtonHover(screenX, screenY); + return TRUE; + } + else + { + return LLButton::handleHover(x, y, mask); + } } //virtual BOOL LLBottomtrayButton::handleMouseUp(S32 x, S32 y, MASK mask) { - S32 screenX, screenY; - localPointToScreen(x, y, &screenX, &screenY); - // pass mouse up to bottomtray - LLBottomTray::getInstance()->onDraggableButtonMouseUp(this, screenX, screenY); - LLButton::handleMouseUp(x, y, mask); - return FALSE; + if (mCanDrag) + { + S32 screenX, screenY; + localPointToScreen(x, y, &screenX, &screenY); + // pass mouse up to bottomtray + LLBottomTray::getInstance()->onDraggableButtonMouseUp(this, screenX, screenY); + } + return LLButton::handleMouseUp(x, y, mask); } //virtual BOOL LLBottomtrayButton::handleMouseDown(S32 x, S32 y, MASK mask) { - S32 screenX, screenY; - localPointToScreen(x, y, &screenX, &screenY); - // pass mouse up to bottomtray - LLBottomTray::getInstance()->onDraggableButtonMouseDown(this, screenX, screenY); - LLButton::handleMouseDown(x, y, mask); - return FALSE; + if (mCanDrag) + { + S32 screenX, screenY; + localPointToScreen(x, y, &screenX, &screenY); + // pass mouse up to bottomtray + LLBottomTray::getInstance()->onDraggableButtonMouseDown(this, screenX, screenY); + } + return LLButton::handleMouseDown(x, y, mask); } static void update_build_button_enable_state() @@ -150,8 +161,6 @@ public: { mFactoryMap["chat_bar"] = LLCallbackMap(LLBottomTray::createNearbyChatBar, NULL); buildFromFile("panel_bottomtray_lite.xml"); - // Necessary for focus movement among child controls - setFocusRoot(TRUE); } BOOL postBuild() @@ -211,16 +220,11 @@ LLBottomTray::LLBottomTray(const LLSD&) buildFromFile("panel_bottomtray.xml"); - LLUICtrl::CommitCallbackRegistry::defaultRegistrar().add("CameraPresets.ChangeView", boost::bind(&LLFloaterCamera::onClickCameraItem, _2)); - //this is to fix a crash that occurs because LLBottomTray is a singleton //and thus is deleted at the end of the viewers lifetime, but to be cleanly //destroyed LLBottomTray requires some subsystems that are long gone //LLUI::getRootView()->addChild(this); - // Necessary for focus movement among child controls - setFocusRoot(TRUE); - { mBottomTrayLite = new LLBottomTrayLite(); mBottomTrayLite->setFollowsAll(); -- 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/llbottomtray.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llbottomtray.cpp') diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index e47009c540..d869850b7c 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -517,6 +517,7 @@ void LLBottomTray::toggleCameraControls() BOOL LLBottomTray::postBuild() { + LLHints::registerHintTarget("dest_guide_btn", getChild("destinations_btn")->getHandle()); LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("NearbyChatBar.Action", boost::bind(&LLBottomTray::onContextMenuItemClicked, this, _2)); LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("NearbyChatBar.EnableMenuItem", boost::bind(&LLBottomTray::onContextMenuItemEnabled, this, _2)); -- cgit v1.2.3 From d8e40a49ed6b57c5f2b0325803a11cf04b987652 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 7 Oct 2010 15:35:17 -0700 Subject: EXP-156 FIXED custom Skylight hints moved move hint down to bottom of screen made destination hint go away on teleport --- indra/newview/llbottomtray.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llbottomtray.cpp') diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index d869850b7c..fd11045f56 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -517,6 +517,7 @@ void LLBottomTray::toggleCameraControls() BOOL LLBottomTray::postBuild() { + LLHints::registerHintTarget("bottom_tray", LLView::getHandle()); LLHints::registerHintTarget("dest_guide_btn", getChild("destinations_btn")->getHandle()); LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("NearbyChatBar.Action", boost::bind(&LLBottomTray::onContextMenuItemClicked, this, _2)); -- 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/llbottomtray.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llbottomtray.cpp') diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index fd11045f56..758bc7be64 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -220,6 +220,8 @@ LLBottomTray::LLBottomTray(const LLSD&) buildFromFile("panel_bottomtray.xml"); + LLUICtrl::CommitCallbackRegistry::defaultRegistrar().add("CameraPresets.ChangeView", boost::bind(&LLFloaterCamera::onClickCameraItem, _2)); + //this is to fix a crash that occurs because LLBottomTray is a singleton //and thus is deleted at the end of the viewers lifetime, but to be cleanly //destroyed LLBottomTray requires some subsystems that are long gone -- cgit v1.2.3 From e638204dc2d8b409f17f7cdf8938deb97d137dbc Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 21 Oct 2010 17:14:14 -0700 Subject: EXP-273 WIP added avatar picker popup and hint --- indra/newview/llbottomtray.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llbottomtray.cpp') diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 758bc7be64..1ba2a69289 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -521,6 +521,7 @@ BOOL LLBottomTray::postBuild() { LLHints::registerHintTarget("bottom_tray", LLView::getHandle()); LLHints::registerHintTarget("dest_guide_btn", getChild("destinations_btn")->getHandle()); + LLHints::registerHintTarget("avatar_picker_btn", getChild("avatar_picker_btn")->getHandle()); LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("NearbyChatBar.Action", boost::bind(&LLBottomTray::onContextMenuItemClicked, this, _2)); LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("NearbyChatBar.EnableMenuItem", boost::bind(&LLBottomTray::onContextMenuItemEnabled, this, _2)); -- cgit v1.2.3 From 4df678e33461e960cbe49bdb1cb23afe799b6cdb Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 26 Oct 2010 11:24:32 -0700 Subject: EXP-331 FIXED Avatar and Destination Guild UI Hints not showing --- indra/newview/llbottomtray.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llbottomtray.cpp') diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 1ba2a69289..5dfb9bda3c 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -520,8 +520,8 @@ void LLBottomTray::toggleCameraControls() BOOL LLBottomTray::postBuild() { LLHints::registerHintTarget("bottom_tray", LLView::getHandle()); - LLHints::registerHintTarget("dest_guide_btn", getChild("destinations_btn")->getHandle()); - LLHints::registerHintTarget("avatar_picker_btn", getChild("avatar_picker_btn")->getHandle()); + LLHints::registerHintTarget("dest_guide_btn", getChild("destination_btn")->getHandle()); + LLHints::registerHintTarget("avatar_picker_btn", getChild("avatar_btn")->getHandle()); LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("NearbyChatBar.Action", boost::bind(&LLBottomTray::onContextMenuItemClicked, this, _2)); LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("NearbyChatBar.EnableMenuItem", boost::bind(&LLBottomTray::onContextMenuItemEnabled, this, _2)); -- cgit v1.2.3