diff options
Diffstat (limited to 'indra/newview/lloverlaybar.cpp')
-rw-r--r-- | indra/newview/lloverlaybar.cpp | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/indra/newview/lloverlaybar.cpp b/indra/newview/lloverlaybar.cpp index b16f56d0d8..2ccd729e0a 100644 --- a/indra/newview/lloverlaybar.cpp +++ b/indra/newview/lloverlaybar.cpp @@ -45,7 +45,6 @@ #include "llfocusmgr.h" #include "llimview.h" #include "llmediaremotectrl.h" -#include "llpanelaudiovolume.h" #include "llparcel.h" #include "lltextbox.h" #include "llui.h" @@ -60,7 +59,7 @@ #include "lluictrlfactory.h" #include "llviewerwindow.h" #include "llvoiceclient.h" -#include "llvoavatar.h" +#include "llvoavatarself.h" #include "llvoiceremotectrl.h" #include "llwebbrowserctrl.h" #include "llselectmgr.h" @@ -89,7 +88,7 @@ void* LLOverlayBar::createMediaRemote(void* userdata) void* LLOverlayBar::createVoiceRemote(void* userdata) { LLOverlayBar *self = (LLOverlayBar*)userdata; - self->mVoiceRemote = new LLVoiceRemoteCtrl(std::string("voice_remote")); + self->mVoiceRemote = new LLVoiceRemoteCtrl(); return self->mVoiceRemote; } @@ -110,23 +109,24 @@ LLOverlayBar::LLOverlayBar() mBuilt = false; - LLCallbackMap::map_t factory_map; - factory_map["media_remote"] = LLCallbackMap(LLOverlayBar::createMediaRemote, this); - factory_map["voice_remote"] = LLCallbackMap(LLOverlayBar::createVoiceRemote, this); - factory_map["chat_bar"] = LLCallbackMap(LLOverlayBar::createChatBar, this); + mFactoryMap["media_remote"] = LLCallbackMap(LLOverlayBar::createMediaRemote, this); + mFactoryMap["voice_remote"] = LLCallbackMap(LLOverlayBar::createVoiceRemote, this); + mFactoryMap["chat_bar"] = LLCallbackMap(LLOverlayBar::createChatBar, this); - LLUICtrlFactory::getInstance()->buildPanel(this, "panel_overlaybar.xml", &factory_map); + LLUICtrlFactory::getInstance()->buildPanel(this, "panel_overlaybar.xml"); } BOOL LLOverlayBar::postBuild() { - childSetAction("IM Received",onClickIMReceived,this); childSetAction("Set Not Busy",onClickSetNotBusy,this); childSetAction("Mouselook",onClickMouselook,this); childSetAction("Stand Up",onClickStandUp,this); childSetAction("Flycam",onClickFlycam,this); childSetVisible("chat_bar", gSavedSettings.getBOOL("ChatVisible")); + mVoiceRemote->expandOrCollapse(); + mMediaRemote->expandOrCollapse(); + setFocusRoot(TRUE); mBuilt = true; @@ -168,8 +168,9 @@ void LLOverlayBar::layoutButtons() // calculate button widths const S32 MAX_BUTTON_WIDTH = 150; + const S32 STATUS_BAR_PAD = 10; S32 segment_width = llclamp(lltrunc((F32)(bar_width) / (F32)button_list.size()), 0, MAX_BUTTON_WIDTH); - S32 btn_width = segment_width - gSavedSettings.getS32("StatusBarPad"); + S32 btn_width = segment_width - STATUS_BAR_PAD; // Evenly space all buttons, starting from left S32 left = 0; @@ -283,13 +284,6 @@ void LLOverlayBar::refresh() //----------------------------------------------------------------------- // static -void LLOverlayBar::onClickIMReceived(void*) -{ - gIMMgr->setFloaterOpen(TRUE); -} - - -// static void LLOverlayBar::onClickSetNotBusy(void*) { gAgent.clearBusy(); |