summaryrefslogtreecommitdiff
path: root/indra/newview/llbottomtray.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llbottomtray.cpp')
-rw-r--r--indra/newview/llbottomtray.cpp42
1 files changed, 41 insertions, 1 deletions
diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp
index 136316fbbe..d7fd97e067 100644
--- a/indra/newview/llbottomtray.cpp
+++ b/indra/newview/llbottomtray.cpp
@@ -43,7 +43,9 @@
//FIXME: temporary, for send_chat_from_viewer() proto
#include "llchatbar.h"
-
+//FIXME: temporary, for stand up proto
+#include "llselectmgr.h"
+#include "llvoavatarself.h"
//
// Globals
//
@@ -61,6 +63,7 @@ LLBottomTray::LLBottomTray()
, mSysWell(NULL)
, mTalkBtn(NULL)
, mGestureCombo(NULL)
+ , mStandUpBtn(NULL) ////FIXME: temporary, for stand up proto
{
LLUICtrlFactory::getInstance()->buildPanel(this,"panel_bottomtray.xml");
@@ -100,6 +103,13 @@ LLBottomTray::LLBottomTray()
refreshGestures();
}
+ ////FIXME: temporary, for stand up proto
+ mStandUpBtn = getChild<LLButton> ("stand", TRUE, FALSE);
+ if (mStandUpBtn)
+ {
+ mStandUpBtn->setCommitCallback(boost::bind(&LLBottomTray::onCommitStandUp, this, _1));
+ }
+
LLIMMgr::getInstance()->addSessionObserver(this);
//this is to fix a crash that occurs because LLBottomTray is a singleton
@@ -283,8 +293,31 @@ void LLBottomTray::refresh()
{
gAgent.stopTyping();
}
+
+ LLPanel::refresh();
}
+void LLBottomTray::draw()
+{
+ refreshStandUp();
+ LLPanel::draw();
+}
+void LLBottomTray::refreshStandUp()
+{
+ //FIXME: temporary, for stand up proto
+ BOOL sitting = FALSE;
+ if (gAgent.getAvatarObject())
+ {
+ sitting = gAgent.getAvatarObject()->mIsSitting;
+ }
+
+ if (mStandUpBtn && mStandUpBtn->getVisible() != sitting)
+ {
+ mStandUpBtn->setVisible(sitting);
+ sendChildToFront(mStandUpBtn);
+ moveChildToBackOfTabGroup(mStandUpBtn);
+ }
+}
void LLBottomTray::updateRightPosition(const S32 new_right_position)
{
LLRect rc = getRect();
@@ -329,6 +362,13 @@ void LLBottomTray::onCommitGesture(LLUICtrl* ctrl)
}
}
+//FIXME: temporary, for stand up proto
+void LLBottomTray::onCommitStandUp(LLUICtrl* ctrl)
+{
+ LLSelectMgr::getInstance()->deselectAllForStandingUp();
+ gAgent.setControlFlags(AGENT_CONTROL_STAND_UP);
+}
+
void LLBottomTray::refreshGestures()
{
if (mGestureCombo)