diff options
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/newview/llhudrender.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/llpanelnearbymedia.cpp | 27 | ||||
| -rw-r--r-- | indra/newview/llpanelnearbymedia.h | 2 | ||||
| -rw-r--r-- | indra/newview/llpanelprimmediacontrols.cpp | 15 | ||||
| -rw-r--r-- | indra/newview/lltoolpie.cpp | 1 | ||||
| -rw-r--r-- | indra/newview/llviewermedia.h | 6 | 
6 files changed, 40 insertions, 13 deletions
diff --git a/indra/newview/llhudrender.cpp b/indra/newview/llhudrender.cpp index 325c9c260c..5b653638f2 100644 --- a/indra/newview/llhudrender.cpp +++ b/indra/newview/llhudrender.cpp @@ -78,7 +78,7 @@ void hud_render_text(const LLWString &wstr, const LLVector3 &pos_agent,  	LLVector3 up_axis;  	if (orthographic)  	{ -		right_axis.setVec(0.f, -1.f / gViewerWindow->getWorldViewWidthRaw(), 0.f); +		right_axis.setVec(0.f, -1.f / gViewerWindow->getWorldViewHeightRaw(), 0.f);  		up_axis.setVec(0.f, 0.f, 1.f / gViewerWindow->getWorldViewHeightRaw());  	}  	else diff --git a/indra/newview/llpanelnearbymedia.cpp b/indra/newview/llpanelnearbymedia.cpp index 93ebae334f..79786c06d9 100644 --- a/indra/newview/llpanelnearbymedia.cpp +++ b/indra/newview/llpanelnearbymedia.cpp @@ -1010,7 +1010,7 @@ void LLPanelNearByMedia::updateControls()  			if (NULL == impl)  			{  				// Just means it hasn't started yet -				showBasicControls(false, false, false); +				showBasicControls(false, false, false, false, 0);  			}  			else if (impl->isMediaTimeBased())  			{ @@ -1022,7 +1022,11 @@ void LLPanelNearByMedia::updateControls()  			}  			else {  				// non-time-based parcel media -				showBasicControls(LLViewerMedia::isParcelMediaPlaying(), false, false); +				showBasicControls(LLViewerMedia::isParcelMediaPlaying(),  +							      false,  +								  false,  +								  impl->getVolume() == 0.0,  +								  impl->getVolume());  			}  		}  	} @@ -1045,19 +1049,28 @@ void LLPanelNearByMedia::updateControls()  			else {  				showBasicControls(!impl->isMediaDisabled(),   								  ! impl->isParcelMedia(),  // include_zoom -								  LLViewerMediaFocus::getInstance()->isZoomed()); +								  LLViewerMediaFocus::getInstance()->isZoomed(), +								  impl->getVolume() == 0.0, +								  impl->getVolume());  			}  		}  	}  } -void LLPanelNearByMedia::showBasicControls(bool playing, bool include_zoom, bool is_zoomed) +void LLPanelNearByMedia::showBasicControls(bool playing, bool include_zoom, bool is_zoomed, bool muted, F32 volume)  {  	mStopCtrl->setVisible(playing);  	mPlayCtrl->setVisible(!playing);  	mPauseCtrl->setVisible(false); -	mMuteCtrl->setVisible(false); +#ifdef PER_MEDIA_VOLUME +	mVolumeSliderCtrl->setVisible(true); +	mMuteCtrl->setVisible(true); +	mMuteBtn->setValue(muted); +	mVolumeSlider->setValue(volume); +#else  	mVolumeSliderCtrl->setVisible(false); +	mMuteCtrl->setVisible(false); +#endif  	mZoomCtrl->setVisible(include_zoom && !is_zoomed);  	mUnzoomCtrl->setVisible(include_zoom && is_zoomed);	  	mStopCtrl->setEnabled(true); @@ -1156,7 +1169,7 @@ void LLPanelNearByMedia::onClickSelectedMediaMute()  	else {  		LLViewerMediaImpl* impl = (selected_media_id == PARCEL_MEDIA_LIST_ITEM_UUID) ?  			((LLViewerMediaImpl*)LLViewerParcelMedia::getParcelMedia()) : LLViewerMedia::getMediaImplFromTextureID(selected_media_id); -		if (NULL != impl && impl->isMediaTimeBased()) +		if (NULL != impl)  		{  			F32 volume = impl->getVolume();  			if(volume > 0.0) @@ -1187,7 +1200,7 @@ void LLPanelNearByMedia::onCommitSelectedMediaVolume()  	else {  		LLViewerMediaImpl* impl = (selected_media_id == PARCEL_MEDIA_LIST_ITEM_UUID) ?  			((LLViewerMediaImpl*)LLViewerParcelMedia::getParcelMedia()) : LLViewerMedia::getMediaImplFromTextureID(selected_media_id); -		if (NULL != impl && impl->isMediaTimeBased()) +		if (NULL != impl)  		{  			impl->setVolume(mVolumeSlider->getValueF32());  		} diff --git a/indra/newview/llpanelnearbymedia.h b/indra/newview/llpanelnearbymedia.h index 7c07867df3..3cecf8e40c 100644 --- a/indra/newview/llpanelnearbymedia.h +++ b/indra/newview/llpanelnearbymedia.h @@ -140,7 +140,7 @@ private:  	bool shouldShow(LLViewerMediaImpl* impl); -	void showBasicControls(bool playing, bool include_zoom, bool is_zoomed); +	void showBasicControls(bool playing, bool include_zoom, bool is_zoomed, bool muted, F32 volume);  	void showTimeBasedControls(bool playing, bool include_zoom, bool is_zoomed, bool muted, F32 volume);  	void showDisabledControls();  	void updateControls(); diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp index f9ca05f178..5209d50755 100644 --- a/indra/newview/llpanelprimmediacontrols.cpp +++ b/indra/newview/llpanelprimmediacontrols.cpp @@ -66,10 +66,6 @@  #include "llwindow.h"  #include "llfloatertools.h"  // to enable hide if build tools are up -#if defined(LL_DARWIN) || (LL_WINDOWS && !LL_RELEASE_FOR_DOWNLOAD ) -#define PER_MEDIA_VOLUME -#endif -  // Functions pulled from pipeline.cpp  glh::matrix4f glh_get_current_modelview();  glh::matrix4f glh_get_current_projection(); @@ -467,10 +463,21 @@ void LLPanelPrimMediaControls::updateShape()  			mSkipBackCtrl->setEnabled(FALSE);  #ifdef PER_MEDIA_VOLUME +			// these should be pulled up above the pluginSupportsMediaTime +			// if check once we always have PER_MEDIA_VOLUME turned on  			mVolumeCtrl->setVisible(has_focus);  			mVolumeCtrl->setEnabled(has_focus);  			mVolumeSliderCtrl->setEnabled(has_focus && shouldVolumeSliderBeVisible());  			mVolumeSliderCtrl->setVisible(has_focus && shouldVolumeSliderBeVisible()); + +			if(media_impl->getVolume() <= 0.0) +			{ +				mMuteBtn->setToggleState(true); +			} +			else +			{ +				mMuteBtn->setToggleState(false); +			}  #else  			mVolumeCtrl->setVisible(FALSE);  			mVolumeSliderCtrl->setVisible(FALSE); diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index a9bbee784d..ae244cd8a1 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -1267,6 +1267,7 @@ bool LLToolPie::handleMediaClick(const LLPickInfo& pick)  	if (!parcel ||  		objectp.isNull() || +		objectp->isHUDAttachment() ||  		pick.mObjectFace < 0 ||   		pick.mObjectFace >= objectp->getNumTEs())   	{ diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index e829d7a5b4..bc6716697e 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -46,6 +46,12 @@  #include "llurl.h" + +#if defined(LL_DARWIN) || (LL_WINDOWS && !LL_RELEASE_FOR_DOWNLOAD ) +#define PER_MEDIA_VOLUME +#endif + +  class LLViewerMediaImpl;  class LLUUID;  class LLViewerMediaTexture;  | 
