summaryrefslogtreecommitdiff
path: root/indra/newview/llnearbychatbar.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2009-10-23 17:20:45 +0000
committerSteven Bennetts <steve@lindenlab.com>2009-10-23 17:20:45 +0000
commitb43771cad585cb9820941eb1b24b67390eaa9435 (patch)
tree322e5f94a1fa473ad4e8c0b343974a72e824f66a /indra/newview/llnearbychatbar.cpp
parent0220106ecdecd323854522a5bc3fd6455c60fdfc (diff)
Merging revisions 2156-2183 of https://svn.aws.productengine.com/secondlife/pe/stable-2 into P:\svn\viewer-2.0.0-3, respecting ancestry
* Bugs: EXT-1590 EXT-1694 EXT-1660 EXT-1646 EXT-1694 EXT-1316 EXT-1775 EXT-1798 EXT-1799 EXT-1117 EXT-1571 EXT-1572 * Dev: EXT-1757 EXT-991 EXT-1758 EXT-1770 EXT-1192 EXT-1613 EXT-1611 EXT-1256 EXT-1758 EXT-747
Diffstat (limited to 'indra/newview/llnearbychatbar.cpp')
-rw-r--r--indra/newview/llnearbychatbar.cpp38
1 files changed, 37 insertions, 1 deletions
diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp
index 4f3bca50ff..5fa97926a5 100644
--- a/indra/newview/llnearbychatbar.cpp
+++ b/indra/newview/llnearbychatbar.cpp
@@ -203,7 +203,7 @@ BOOL LLNearbyChatBar::postBuild()
mOutputMonitor = getChild<LLOutputMonitorCtrl>("chat_zone_indicator");
mOutputMonitor->setVisible(FALSE);
- mTalkBtn = getChild<LLTalkButton>("talk");
+ mTalkBtn = getParent()->getChild<LLTalkButton>("talk");
// Speak button should be initially disabled because
// it takes some time between logging in to world and connecting to voice channel.
@@ -229,6 +229,16 @@ bool LLNearbyChatBar::instanceExists()
void LLNearbyChatBar::draw()
{
+ LLRect rect = getRect();
+ S32 max_width = getMaxWidth();
+
+ if (rect.getWidth() > max_width)
+ {
+ rect.setLeftTopAndSize(rect.mLeft, rect.mTop, max_width, rect.getHeight());
+ reshape(rect.getWidth(), rect.getHeight(), FALSE);
+ setRect(rect);
+ }
+
displaySpeakingIndicator();
LLPanel::draw();
}
@@ -254,6 +264,32 @@ BOOL LLNearbyChatBar::handleKeyHere( KEY key, MASK mask )
return handled;
}
+S32 LLNearbyChatBar::getMinWidth() const
+{
+ static S32 min_width = -1;
+
+ if (min_width < 0)
+ {
+ const std::string& s = getString("min_width");
+ min_width = !s.empty() ? atoi(s.c_str()) : 300;
+ }
+
+ return min_width;
+}
+
+S32 LLNearbyChatBar::getMaxWidth() const
+{
+ static S32 max_width = -1;
+
+ if (max_width < 0)
+ {
+ const std::string& s = getString("max_width");
+ max_width = !s.empty() ? atoi(s.c_str()) : 510;
+ }
+
+ return max_width;
+}
+
BOOL LLNearbyChatBar::matchChatTypeTrigger(const std::string& in_str, std::string* out_str)
{
U32 in_len = in_str.length();