summaryrefslogtreecommitdiff
path: root/indra/newview/llspeakbutton.cpp
diff options
context:
space:
mode:
authorAndrew Dyukov <adyukov@productengine.com>2010-09-06 21:35:01 +0300
committerAndrew Dyukov <adyukov@productengine.com>2010-09-06 21:35:01 +0300
commite04dabd2b3309b595bbc1afa0dfa7d4081439eba (patch)
treecd4cf9f42953b7ac3cc7ecfe1be08c7cf0a9e934 /indra/newview/llspeakbutton.cpp
parentebfbaad9696ce0389ed1a9642d58dfb4a0abdc17 (diff)
VWR-20705 VWR-20706 FIXED Implemented drag'n'drop of buttons in bottomtray.
- Though visually user drags buttons, layout panels are really moved. To move one panel before other, new method movePanelBeforeOther() was added to layout stack. - When drag'n'drop is finished, order of panels in layout stack mToolbarStack is changed, and also order vectors are updated in bottomtray.These are vectors mButtonsProcessOrder and mButtonsOrder. mButtonsOrder was introduced in this changeset to store order of all bottomtray buttons that may change place via drag'n'drop and should save and load it between sessions. mButtonsProcessOrder is not enough for it because it contains only buttons that may be hidden(and for example Speak button is not included in it). - To pass mouse events from buttons to bottomtray, new class LLBottomtrayButton was added (and new widget bottomtray_button for it). Reviewed by Vadim Savchuk.
Diffstat (limited to 'indra/newview/llspeakbutton.cpp')
-rw-r--r--indra/newview/llspeakbutton.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/indra/newview/llspeakbutton.cpp b/indra/newview/llspeakbutton.cpp
index b8838346d0..3dce66f394 100644
--- a/indra/newview/llspeakbutton.cpp
+++ b/indra/newview/llspeakbutton.cpp
@@ -37,6 +37,8 @@
#include "llspeakbutton.h"
+#include "llbottomtray.h"
+
static LLDefaultChildRegistry::Register<LLSpeakButton> t1("talk_button");
//////////////////////////////////////////////////////////////////////////
@@ -67,7 +69,7 @@ void LLSpeakButton::setSpeakBtnEnabled(bool enabled)
}
void LLSpeakButton::setFlyoutBtnEnabled(bool enabled)
{
- LLButton* show_btn = getChild<LLButton>("speak_flyout_btn");
+ LLButton* show_btn = getChild<LLBottomtrayButton>("speak_flyout_btn");
show_btn->setEnabled(enabled);
}
@@ -96,9 +98,9 @@ LLSpeakButton::LLSpeakButton(const Params& p)
mSpeakBtn->setMouseUpCallback(boost::bind(&LLSpeakButton::onMouseUp_SpeakBtn, this));
mSpeakBtn->setToggleState(FALSE);
- LLButton::Params show_params = p.show_button;
+ LLBottomtrayButton::Params show_params = p.show_button;
show_params.rect(show_rect);
- mShowBtn = LLUICtrlFactory::create<LLButton>(show_params);
+ mShowBtn = LLUICtrlFactory::create<LLBottomtrayButton>(show_params);
addChild(mShowBtn);
LLTransientFloaterMgr::getInstance()->addControlView(mShowBtn);