From 903de794d2ce610be775cf44453643f8419447ef Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Mon, 30 Nov 2009 15:22:16 +0000 Subject: pretty good volume bar appear-on-hover --- indra/newview/llstatusbar.cpp | 12 ++++++++++++ indra/newview/llstatusbar.h | 1 + 2 files changed, 13 insertions(+) (limited to 'indra') diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index d57564a9f0..04b96a3a01 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -161,6 +161,7 @@ LLStatusBar::LLStatusBar(const LLRect& rect) mBtnVolume = getChild( "volume_btn" ); mBtnVolume->setClickedCallback( onClickVolume, this ); + mBtnVolume->setMouseEnterCallback(boost::bind(&LLStatusBar::onMouseEnterVolume, this)); mPanelVolume = getChild( "volume_pulldown" ); @@ -508,6 +509,17 @@ static void onClickScriptDebug(void*) LLFloaterScriptDebug::show(LLUUID::null); } +//static +void LLStatusBar::onMouseEnterVolume(LLUICtrl* ctrl) +{ +#if 1 + //LLFloater* vp = + LLFloaterReg::showInstance("volume_pulldown"); //tmp +#else + #error do this for panel +#endif +} + static void onClickVolume(void* data) { // toggle the master mute setting diff --git a/indra/newview/llstatusbar.h b/indra/newview/llstatusbar.h index acb211b738..347530806e 100644 --- a/indra/newview/llstatusbar.h +++ b/indra/newview/llstatusbar.h @@ -95,6 +95,7 @@ private: void onVolumeChanged(const LLSD& newvalue); + static void onMouseEnterVolume(LLUICtrl* ctrl); static void onClickStatGraph(void* data); private: -- cgit v1.2.3