summaryrefslogtreecommitdiff
path: root/indra/newview/llbottomtray.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2011-03-31 16:51:41 -0400
committerOz Linden <oz@lindenlab.com>2011-03-31 16:51:41 -0400
commitc5ae838ce3cd8521b7b4817f153560e03a8dcc32 (patch)
tree7a489631ed3811ae52fab7bbf6b5a1075aa20e65 /indra/newview/llbottomtray.cpp
parentba0c369aa20cdbfd7940a2435dd3c6630f0d54ae (diff)
parent4047349ade461fa6bac43da2a14c6e7689918aa1 (diff)
pull improved avatar physics ui and other improvements from Seraph
Diffstat (limited to 'indra/newview/llbottomtray.cpp')
-rw-r--r--indra/newview/llbottomtray.cpp34
1 files changed, 29 insertions, 5 deletions
diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp
index d8ec4b605c..0371b7be71 100644
--- a/indra/newview/llbottomtray.cpp
+++ b/indra/newview/llbottomtray.cpp
@@ -38,12 +38,15 @@
#include "lltexteditor.h"
// newview includes
+#include "llagent.h"
#include "llagentcamera.h"
+#include "llavataractions.h"
#include "llchiclet.h"
#include "llfloatercamera.h"
#include "llhints.h"
#include "llimfloater.h" // for LLIMFloater
#include "llnearbychatbar.h"
+#include "llsidetray.h"
#include "llspeakbutton.h"
#include "llsplitbutton.h"
#include "llsyswellwindow.h"
@@ -52,6 +55,7 @@
#include "llviewerwindow.h"
#include "llsdserialize.h"
+#include "llfirstuse.h"
// Distance from mouse down on which drag'n'drop should be started.
#define DRAG_START_DISTANCE 3
@@ -378,7 +382,12 @@ void LLBottomTray::onChange(EStatusType status, const std::string &channelURI, b
// skipped to avoid button blinking
if (status != STATUS_JOINING && status!= STATUS_LEFT_CHANNEL)
{
- mSpeakBtn->setFlyoutBtnEnabled(LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking());
+ bool voice_status = LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking();
+ mSpeakBtn->setFlyoutBtnEnabled(voice_status);
+ if (voice_status)
+ {
+ LLFirstUse::speak(true);
+ }
}
}
@@ -418,10 +427,6 @@ void LLBottomTray::setVisible(BOOL visible)
{
LLPanel::setVisible(visible);
}
- if(visible)
- gFloaterView->setSnapOffsetBottom(getRect().getHeight());
- else
- gFloaterView->setSnapOffsetBottom(0);
}
S32 LLBottomTray::notifyParent(const LLSD& info)
@@ -562,6 +567,7 @@ BOOL LLBottomTray::postBuild()
mSpeakPanel = getChild<LLPanel>("speak_panel");
mSpeakBtn = getChild<LLSpeakButton>("talk");
+ LLHints::registerHintTarget("speak_btn", mSpeakBtn->getHandle());
// Both parts of speak button should be initially disabled because
// it takes some time between logging in to world and connecting to voice channel.
@@ -849,6 +855,24 @@ void LLBottomTray::draw()
LLRect rect = mLandingTab->calcScreenRect();
mImageDragIndication->draw(rect.mLeft - w/2, rect.getHeight(), w, h);
}
+ getChild<LLButton>("show_profile_btn")->setToggleState(LLAvatarActions::profileVisible(gAgent.getID()));
+
+ LLPanel* panel = LLSideTray::getInstance()->getPanel("panel_people");
+ if (panel && panel->isInVisibleChain())
+ {
+ getChild<LLButton>("show_people_button")->setToggleState(true);
+ }
+ else
+ {
+ getChild<LLButton>("show_people_button")->setToggleState(false);
+ }
+
+ LLFloater* help_browser = (LLFloaterReg::findInstance("help_browser"));
+ bool help_floater_visible = (help_browser && help_browser->isInVisibleChain());
+
+ getChild<LLButton>("show_help_btn")->setToggleState(help_floater_visible);
+
+
}
bool LLBottomTray::onContextMenuItemEnabled(const LLSD& userdata)