summaryrefslogtreecommitdiff
path: root/indra/newview/llstatusbar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llstatusbar.cpp')
-rw-r--r--indra/newview/llstatusbar.cpp44
1 files changed, 40 insertions, 4 deletions
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp
index 72c5c961aa..6c95bcc0ae 100644
--- a/indra/newview/llstatusbar.cpp
+++ b/indra/newview/llstatusbar.cpp
@@ -38,6 +38,7 @@
#include "llfloaterbuycurrency.h"
#include "llbuycurrencyhtml.h"
#include "llpanelnearbymedia.h"
+#include "llpanelpresetscamerapulldown.h"
#include "llpanelpresetspulldown.h"
#include "llpanelvolumepulldown.h"
#include "llfloaterregioninfo.h"
@@ -171,8 +172,11 @@ BOOL LLStatusBar::postBuild()
mBtnStats = getChildView("stat_btn");
- mIconPresets = getChild<LLIconCtrl>( "presets_icon" );
- mIconPresets->setMouseEnterCallback(boost::bind(&LLStatusBar::onMouseEnterPresets, this));
+ mIconPresetsCamera = getChild<LLIconCtrl>( "presets_icon_camera" );
+ mIconPresetsCamera->setMouseEnterCallback(boost::bind(&LLStatusBar::onMouseEnterPresetsCamera, this));
+
+ mIconPresetsGraphic = getChild<LLIconCtrl>( "presets_icon_graphic" );
+ mIconPresetsGraphic->setMouseEnterCallback(boost::bind(&LLStatusBar::onMouseEnterPresets, this));
mBtnVolume = getChild<LLButton>( "volume_btn" );
mBtnVolume->setClickedCallback( onClickVolume, this );
@@ -227,6 +231,11 @@ BOOL LLStatusBar::postBuild()
mSGPacketLoss = LLUICtrlFactory::create<LLStatGraph>(pgp);
addChild(mSGPacketLoss);
+ mPanelPresetsCameraPulldown = new LLPanelPresetsCameraPulldown();
+ addChild(mPanelPresetsCameraPulldown);
+ mPanelPresetsCameraPulldown->setFollows(FOLLOWS_TOP|FOLLOWS_RIGHT);
+ mPanelPresetsCameraPulldown->setVisible(FALSE);
+
mPanelPresetsPulldown = new LLPanelPresetsPulldown();
addChild(mPanelPresetsPulldown);
mPanelPresetsPulldown->setFollows(FOLLOWS_TOP|FOLLOWS_RIGHT);
@@ -325,7 +334,8 @@ void LLStatusBar::setVisibleForMouselook(bool visible)
mSGBandwidth->setVisible(visible);
mSGPacketLoss->setVisible(visible);
setBackgroundVisible(visible);
- mIconPresets->setVisible(visible);
+ mIconPresetsCamera->setVisible(visible);
+ mIconPresetsGraphic->setVisible(visible);
}
void LLStatusBar::debitBalance(S32 debit)
@@ -470,10 +480,34 @@ void LLStatusBar::onClickBuyCurrency()
LLFirstUse::receiveLindens(false);
}
+void LLStatusBar::onMouseEnterPresetsCamera()
+{
+ LLView* popup_holder = gViewerWindow->getRootView()->getChildView("popup_holder");
+ LLIconCtrl* icon = getChild<LLIconCtrl>( "presets_icon_camera" );
+ LLRect icon_rect = icon->getRect();
+ LLRect pulldown_rect = mPanelPresetsCameraPulldown->getRect();
+ pulldown_rect.setLeftTopAndSize(icon_rect.mLeft -
+ (pulldown_rect.getWidth() - icon_rect.getWidth()),
+ icon_rect.mBottom,
+ pulldown_rect.getWidth(),
+ pulldown_rect.getHeight());
+
+ pulldown_rect.translate(popup_holder->getRect().getWidth() - pulldown_rect.mRight, 0);
+ mPanelPresetsCameraPulldown->setShape(pulldown_rect);
+
+ // show the master presets pull-down
+ LLUI::clearPopups();
+ LLUI::addPopup(mPanelPresetsCameraPulldown);
+ mPanelNearByMedia->setVisible(FALSE);
+ mPanelVolumePulldown->setVisible(FALSE);
+ mPanelPresetsPulldown->setVisible(FALSE);
+ mPanelPresetsCameraPulldown->setVisible(TRUE);
+}
+
void LLStatusBar::onMouseEnterPresets()
{
LLView* popup_holder = gViewerWindow->getRootView()->getChildView("popup_holder");
- LLIconCtrl* icon = getChild<LLIconCtrl>( "presets_icon" );
+ LLIconCtrl* icon = getChild<LLIconCtrl>( "presets_icon_graphic" );
LLRect icon_rect = icon->getRect();
LLRect pulldown_rect = mPanelPresetsPulldown->getRect();
pulldown_rect.setLeftTopAndSize(icon_rect.mLeft -
@@ -512,6 +546,7 @@ void LLStatusBar::onMouseEnterVolume()
// show the master volume pull-down
LLUI::clearPopups();
LLUI::addPopup(mPanelVolumePulldown);
+ mPanelPresetsCameraPulldown->setVisible(FALSE);
mPanelPresetsPulldown->setVisible(FALSE);
mPanelNearByMedia->setVisible(FALSE);
mPanelVolumePulldown->setVisible(TRUE);
@@ -536,6 +571,7 @@ void LLStatusBar::onMouseEnterNearbyMedia()
LLUI::clearPopups();
LLUI::addPopup(mPanelNearByMedia);
+ mPanelPresetsCameraPulldown->setVisible(FALSE);
mPanelPresetsPulldown->setVisible(FALSE);
mPanelVolumePulldown->setVisible(FALSE);
mPanelNearByMedia->setVisible(TRUE);