diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/CMakeLists.txt | 3 | ||||
-rw-r--r-- | indra/newview/llstatusbar.cpp | 20 | ||||
-rw-r--r-- | indra/newview/llstatusbar.h | 3 | ||||
-rw-r--r-- | indra/newview/llviewerfloaterreg.cpp | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_status_bar.xml | 11 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_volume_pulldown.xml | 32 |
6 files changed, 68 insertions, 3 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index e632cbaaf2..be60cecb3f 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -185,7 +185,7 @@ set(viewer_SOURCE_FILES llfloatermediasettings.cpp llfloatermemleak.cpp llfloaternamedesc.cpp - llfloaternearbymedia.cpp + llfloaternearbymedia.cpp llfloaternotificationsconsole.cpp llfloateropenobject.cpp llfloaterparcel.cpp @@ -212,6 +212,7 @@ set(viewer_SOURCE_FILES llfloaterurldisplay.cpp llfloaterurlentry.cpp llfloatervoicedevicesettings.cpp + llfloatervolumepulldown.cpp llfloaterwater.cpp llfloaterwhitelistentry.cpp llfloaterwindlight.cpp diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index b649a0c38e..2c18c41a5e 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -42,6 +42,7 @@ #include "llfloaterbuycurrency.h" #include "llfloaterchat.h" #include "llfloaterlagmeter.h" +#include "llfloatervolumepulldown.h" #include "llfloaterregioninfo.h" #include "llfloaterscriptdebug.h" #include "llhudicon.h" @@ -123,6 +124,7 @@ LLStatusBar::LLStatusBar(const LLRect& rect) mSGPacketLoss(NULL), mBtnBuyCurrency(NULL), mBtnVolume(NULL), + mPanelVolume(NULL), mBalance(0), mHealth(100), mSquareMetersCredit(0), @@ -158,6 +160,8 @@ LLStatusBar::LLStatusBar(const LLRect& rect) mBtnVolume = getChild<LLButton>( "volume_btn" ); mBtnVolume->setClickedCallback( onClickVolume, this ); + mPanelVolume = getChild<LLPanel>( "volume_pulldown" ); + gSavedSettings.getControl("MuteAudio")->getSignal()->connect(boost::bind(&LLStatusBar::onVolumeChanged, this, _2)); childSetAction("scriptout", onClickScriptDebug, this); @@ -201,7 +205,6 @@ LLStatusBar::LLStatusBar(const LLRect& rect) addChild(mSGPacketLoss); childSetActionTextbox("stat_btn", onClickStatGraph); - } LLStatusBar::~LLStatusBar() @@ -509,6 +512,21 @@ static void onClickVolume(void* data) // toggle the master mute setting BOOL mute_audio = gSavedSettings.getBOOL("MuteAudio"); gSavedSettings.setBOOL("MuteAudio", !mute_audio); + + // toggle the master volume pull-down + + //LLFloaterReg::showInstance("volume_pulldown"); //tmp + //LLPanelVolumePulldown *foo= + //new LLPanelVolumePulldown(); + //LLPanel* container = getRootView();//->getChild<LLPanel>("nav_bar_container"); + //container->addChild(foo); + LLStatusBar *sb = (LLStatusBar*)(data); + llassert_always(sb); + sb->mPanelVolume->setRect(LLRect(1,1,100,100)); + sb->mPanelVolume->setShape(LLRect(1,1,100,100)); + sb->mPanelVolume->setBackgroundColor(LLColor3(1.0, 0.0, 0.0)); + sb->mPanelVolume->setVisible(TRUE); + sb->mPanelVolume->setEnabled(TRUE); } // sets the static variables necessary for the date diff --git a/indra/newview/llstatusbar.h b/indra/newview/llstatusbar.h index bdaacce981..7be119dd4d 100644 --- a/indra/newview/llstatusbar.h +++ b/indra/newview/llstatusbar.h @@ -86,6 +86,8 @@ public: S32 getSquareMetersCommitted() const; S32 getSquareMetersLeft() const; + LLPanel *mPanelVolume; + private: // simple method to setup the part that holds the date void setupDate(); @@ -93,7 +95,6 @@ private: void onVolumeChanged(const LLSD& newvalue); static void onClickStatGraph(void* data); - private: LLTextBox *mTextHealth; diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 642df92379..1f735d6dfb 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -105,6 +105,7 @@ #include "llfloateruipreview.h" #include "llfloaterurldisplay.h" #include "llfloatervoicedevicesettings.h" +#include "llfloatervolumepulldown.h" #include "llfloaterwater.h" #include "llfloaterwhitelistentry.h" #include "llfloaterwindlight.h" @@ -247,6 +248,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("upload_image", "floater_image_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterImagePreview>, "upload"); LLFloaterReg::add("upload_sound", "floater_sound_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSoundPreview>, "upload"); + LLFloaterReg::add("volume_pulldown", "floater_volume_pulldown.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterVolumePulldown>); LLFloaterReg::add("voice_call", "floater_call.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterCall>); LLFloaterReg::add("whitelist_entry", "floater_whitelist_entry.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterWhiteListEntry>); diff --git a/indra/newview/skins/default/xui/en/panel_status_bar.xml b/indra/newview/skins/default/xui/en/panel_status_bar.xml index 65bc48265d..a296795aed 100644 --- a/indra/newview/skins/default/xui/en/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml @@ -81,6 +81,17 @@ name="volume_btn" tool_tip="Global Volume Control" width="16" /> + <panel + class="panel_volume_pulldown" + filename="panel_volume_pulldown.xml" + follows="all" + height="533" + layout="topleft" + left="0" + name="volume_pulldown" + top="5" + visible="false" + width="313" /> <text enabled="true" follows="right|bottom" diff --git a/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml b/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml new file mode 100644 index 0000000000..8c12fd1fb4 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<panel + chrome="true" + border="false" + follows="all" + height="50" + label="xSounds" + layout="topleft" + left="1" + name="xPreference Media panel" + top="1" + width="150"> + <slider + control_name="AudioLevelMaster" + follows="left|top" + font.style="BOLD" + height="15" + increment="0.05" + initial_value="0.5" + layout="topleft" + left="0" + name="System Volume" + show_text="false" + slider_label.halign="right" + top_pad="5" + volume="true" + width="120"> + <slider.commit_callback + function="Vol.setControlFalse" + parameter="MuteAudio" /> + </slider> +</panel> |