diff options
author | Armin Weatherwax | 2011-03-21 16:30:09 +0100 |
---|---|---|
committer | Armin Weatherwax | 2011-03-22 11:42:21 +0100 |
commit | bb470dd0875458ee20089d97d4cc6d6d1e1545e1 (patch) | |
tree | 5c184a55720adb1083bf2297f8af7b2185009877 | |
parent | several embedded browser proxy fixes and one small cookie fix (diff) | |
download | meta-impy-bb470dd0875458ee20089d97d4cc6d6d1e1545e1.zip meta-impy-bb470dd0875458ee20089d97d4cc6d6d1e1545e1.tar.gz meta-impy-bb470dd0875458ee20089d97d4cc6d6d1e1545e1.tar.bz2 meta-impy-bb470dd0875458ee20089d97d4cc6d6d1e1545e1.tar.xz |
allow interaction with parcel web media
* the media face gets focus on click and you can interact with mouse and keyboard with it -
just as you would expect it to work in the first place anyway.
* added a checkbox in prefs audio & video for what I call "media helper widget" which allows zooming on
the face, open the link in a browser window and such - the name of the LL debug setting is a bit misleading
("MediaOnAPrimUI"), since this is not MOAP I avoided that name.
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llpanelaudioprefs.cpp | 3 | ||||
-rw-r--r-- | linden/indra/newview/llpanelaudioprefs.h | 1 | ||||
-rw-r--r-- | linden/indra/newview/lltoolpie.cpp | 17 | ||||
-rw-r--r-- | linden/indra/newview/llviewermediafocus.cpp | 18 | ||||
-rw-r--r-- | linden/indra/newview/skins/default/xui/en-us/panel_preferences_audio.xml | 5 |
5 files changed, 33 insertions, 11 deletions
diff --git a/linden/indra/newview/llpanelaudioprefs.cpp b/linden/indra/newview/llpanelaudioprefs.cpp index 1acfcbb..f1a8af5 100644 --- a/linden/indra/newview/llpanelaudioprefs.cpp +++ b/linden/indra/newview/llpanelaudioprefs.cpp | |||
@@ -112,6 +112,7 @@ void LLPanelAudioPrefs::refreshValues() | |||
112 | 112 | ||
113 | mPreviousStreamingMusic = gSavedSettings.getBOOL("AudioStreamingMusic"); | 113 | mPreviousStreamingMusic = gSavedSettings.getBOOL("AudioStreamingMusic"); |
114 | mPreviousStreamingVideo = gSavedSettings.getBOOL("AudioStreamingVideo"); | 114 | mPreviousStreamingVideo = gSavedSettings.getBOOL("AudioStreamingVideo"); |
115 | mPreviousHelperWidget = gSavedSettings.getBOOL("MediaOnAPrimUI"); | ||
115 | 116 | ||
116 | mPreviousMuteAudio = gSavedSettings.getBOOL("MuteAudio"); | 117 | mPreviousMuteAudio = gSavedSettings.getBOOL("MuteAudio"); |
117 | mPreviousMuteWhenMinimized = gSavedSettings.getBOOL("MuteWhenMinimized"); | 118 | mPreviousMuteWhenMinimized = gSavedSettings.getBOOL("MuteWhenMinimized"); |
@@ -140,7 +141,7 @@ void LLPanelAudioPrefs::cancel() | |||
140 | 141 | ||
141 | gSavedSettings.setBOOL("AudioStreamingMusic", mPreviousStreamingMusic ); | 142 | gSavedSettings.setBOOL("AudioStreamingMusic", mPreviousStreamingMusic ); |
142 | gSavedSettings.setBOOL("AudioStreamingVideo", mPreviousStreamingVideo ); | 143 | gSavedSettings.setBOOL("AudioStreamingVideo", mPreviousStreamingVideo ); |
143 | 144 | gSavedSettings.setBOOL("MediaOnAPrimUI", mPreviousHelperWidget ); | |
144 | 145 | ||
145 | gSavedSettings.setBOOL("MuteAudio", mPreviousMuteAudio ); | 146 | gSavedSettings.setBOOL("MuteAudio", mPreviousMuteAudio ); |
146 | gSavedSettings.setBOOL("MuteWhenMinimized", mPreviousMuteWhenMinimized ); | 147 | gSavedSettings.setBOOL("MuteWhenMinimized", mPreviousMuteWhenMinimized ); |
diff --git a/linden/indra/newview/llpanelaudioprefs.h b/linden/indra/newview/llpanelaudioprefs.h index 21d2f59..56982b8 100644 --- a/linden/indra/newview/llpanelaudioprefs.h +++ b/linden/indra/newview/llpanelaudioprefs.h | |||
@@ -75,6 +75,7 @@ private: | |||
75 | 75 | ||
76 | BOOL mPreviousStreamingMusic; | 76 | BOOL mPreviousStreamingMusic; |
77 | BOOL mPreviousStreamingVideo; | 77 | BOOL mPreviousStreamingVideo; |
78 | BOOL mPreviousHelperWidget; | ||
78 | BOOL mPreviousMuteAudio; | 79 | BOOL mPreviousMuteAudio; |
79 | BOOL mPreviousMuteWhenMinimized; | 80 | BOOL mPreviousMuteWhenMinimized; |
80 | }; | 81 | }; |
diff --git a/linden/indra/newview/lltoolpie.cpp b/linden/indra/newview/lltoolpie.cpp index 34735a3..b7d762c 100644 --- a/linden/indra/newview/lltoolpie.cpp +++ b/linden/indra/newview/lltoolpie.cpp | |||
@@ -800,6 +800,14 @@ BOOL LLToolPie::handleDoubleClick(S32 x, S32 y, MASK mask) | |||
800 | LL_DEBUGS("DoubleClicks") << "Double clicked a touch-scripted object" << LL_ENDL; | 800 | LL_DEBUGS("DoubleClicks") << "Double clicked a touch-scripted object" << LL_ENDL; |
801 | return FALSE; | 801 | return FALSE; |
802 | } | 802 | } |
803 | |||
804 | const LLTextureEntry* tep = object->getTE(mPick.mObjectFace); | ||
805 | viewer_media_t media_impl = LLViewerMedia::getMediaImplFromTextureID(tep->getID()); | ||
806 | if (tep && media_impl.notNull() && media_impl->hasMedia()) | ||
807 | { | ||
808 | LL_DEBUGS("DoubleClicks") << "Double clicked running parcel media" << LL_ENDL; | ||
809 | return FALSE; | ||
810 | } | ||
803 | } | 811 | } |
804 | 812 | ||
805 | std::string action = gSavedSettings.getString("DoubleClickAction"); | 813 | std::string action = gSavedSettings.getString("DoubleClickAction"); |
@@ -938,19 +946,16 @@ static bool handle_media_click(const LLPickInfo& pick) | |||
938 | if (tep | 946 | if (tep |
939 | && media_impl.notNull() | 947 | && media_impl.notNull() |
940 | && media_impl->hasMedia() | 948 | && media_impl->hasMedia() |
941 | && gSavedSettings.getBOOL("MediaOnAPrimUI")) | 949 | /*&& gSavedSettings.getBOOL("MediaOnAPrimUI")*/) |
942 | { | 950 | { |
943 | LLObjectSelectionHandle selection = LLViewerMediaFocus::getInstance()->getSelection(); | 951 | LLObjectSelectionHandle selection = LLViewerMediaFocus::getInstance()->getSelection(); |
944 | if (! selection->contains(pick.getObject(), pick.mObjectFace)) | 952 | if (! selection->contains(pick.getObject(), pick.mObjectFace)) |
945 | { | 953 | { |
946 | LLViewerMediaFocus::getInstance()->setFocusFace(TRUE, pick.getObject(), pick.mObjectFace, media_impl); | 954 | LLViewerMediaFocus::getInstance()->setFocusFace(TRUE, pick.getObject(), pick.mObjectFace, media_impl); |
947 | } | 955 | } |
948 | else | ||
949 | { | ||
950 | media_impl->mouseDown(pick.mXYCoords.mX, pick.mXYCoords.mY); | ||
951 | media_impl->mouseCapture(); // the mouse-up will happen when capture is lost | ||
952 | } | ||
953 | 956 | ||
957 | media_impl->mouseDown(pick.mXYCoords.mX, pick.mXYCoords.mY); | ||
958 | media_impl->mouseCapture(); // the mouse-up will happen when capture is lost | ||
954 | return true; | 959 | return true; |
955 | } | 960 | } |
956 | 961 | ||
diff --git a/linden/indra/newview/llviewermediafocus.cpp b/linden/indra/newview/llviewermediafocus.cpp index 2e372a1..c81cd76 100644 --- a/linden/indra/newview/llviewermediafocus.cpp +++ b/linden/indra/newview/llviewermediafocus.cpp | |||
@@ -48,6 +48,7 @@ | |||
48 | #include "llparcel.h" | 48 | #include "llparcel.h" |
49 | #include "llviewerparcelmgr.h" | 49 | #include "llviewerparcelmgr.h" |
50 | #include "llweb.h" | 50 | #include "llweb.h" |
51 | #include "llviewercontrol.h"//gSavedSettings | ||
51 | // | 52 | // |
52 | // LLViewerMediaFocus | 53 | // LLViewerMediaFocus |
53 | // | 54 | // |
@@ -99,7 +100,7 @@ void LLViewerMediaFocus::setFocusFace( BOOL b, LLPointer<LLViewerObject> objectp | |||
99 | LLSelectMgr::getInstance()->selectObjectOnly(objectp, face); | 100 | LLSelectMgr::getInstance()->selectObjectOnly(objectp, face); |
100 | 101 | ||
101 | mFocus = LLSelectMgr::getInstance()->getSelection(); | 102 | mFocus = LLSelectMgr::getInstance()->getSelection(); |
102 | if(mMediaHUD.get() && ! parcel->getMediaPreventCameraZoom()) | 103 | if(gSavedSettings.getBOOL("MediaOnAPrimUI") && mMediaHUD.get() && ! parcel->getMediaPreventCameraZoom()) |
103 | { | 104 | { |
104 | mMediaHUD.get()->resetZoomLevel(); | 105 | mMediaHUD.get()->resetZoomLevel(); |
105 | mMediaHUD.get()->nextZoomLevel(); | 106 | mMediaHUD.get()->nextZoomLevel(); |
@@ -224,14 +225,20 @@ void LLViewerMediaFocus::setMouseOverFlag(bool b, viewer_media_t media_impl) | |||
224 | { | 225 | { |
225 | if (b && media_impl.notNull()) | 226 | if (b && media_impl.notNull()) |
226 | { | 227 | { |
227 | if(! mMediaHUD.get()) | 228 | |
229 | if(! mMediaHUD.get() && gSavedSettings.getBOOL("MediaOnAPrimUI")) | ||
228 | { | 230 | { |
229 | LLPanelMediaHUD* media_hud = new LLPanelMediaHUD(mMediaImpl); | 231 | LLPanelMediaHUD* media_hud = new LLPanelMediaHUD(mMediaImpl); |
230 | mMediaHUD = media_hud->getHandle(); | 232 | mMediaHUD = media_hud->getHandle(); |
231 | gHUDView->addChild(media_hud); | 233 | gHUDView->addChild(media_hud); |
232 | } | 234 | } |
233 | mMediaHUD.get()->setMediaImpl(media_impl); | 235 | |
236 | if(mMediaHUD.get()) | ||
237 | { | ||
238 | mMediaHUD.get()->setMediaImpl(media_impl); | ||
239 | } | ||
234 | mMediaImpl = media_impl; | 240 | mMediaImpl = media_impl; |
241 | |||
235 | } | 242 | } |
236 | mMouseOverFlag = b; | 243 | mMouseOverFlag = b; |
237 | } | 244 | } |
@@ -281,7 +288,10 @@ void LLViewerMediaFocus::update() | |||
281 | { | 288 | { |
282 | if (mMediaHUD.get()) | 289 | if (mMediaHUD.get()) |
283 | { | 290 | { |
284 | if(mFocus.notNull() || mMouseOverFlag || mMediaHUD.get()->isMouseOver()) | 291 | if(gSavedSettings.getBOOL("MediaOnAPrimUI") |
292 | &&(mFocus.notNull() | ||
293 | || mMouseOverFlag | ||
294 | || mMediaHUD.get()->isMouseOver() ) ) | ||
285 | { | 295 | { |
286 | // mMediaHUD.get()->setVisible(true); | 296 | // mMediaHUD.get()->setVisible(true); |
287 | mMediaHUD.get()->updateShape(); | 297 | mMediaHUD.get()->updateShape(); |
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_audio.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_audio.xml index c6bb938..1f208e8 100644 --- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_audio.xml +++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_audio.xml | |||
@@ -42,6 +42,11 @@ | |||
42 | initial_value="true" label="Automatically play media" left="162" | 42 | initial_value="true" label="Automatically play media" left="162" |
43 | mouse_opaque="true" name="auto_streaming_video" radio_style="false" | 43 | mouse_opaque="true" name="auto_streaming_video" radio_style="false" |
44 | width="338" /> | 44 | width="338" /> |
45 | <check_box bottom_delta="-20" control_name="MediaOnAPrimUI" enabled="true" | ||
46 | follows="left|top" font="SansSerifSmall" height="16" | ||
47 | initial_value="true" label="Media helper widget" left="162" | ||
48 | mouse_opaque="true" name="media_helper_widget" radio_style="false" | ||
49 | width="338" /> | ||
45 | <check_box bottom_delta="-27" control_name="MuteWhenMinimized" enabled="true" | 50 | <check_box bottom_delta="-27" control_name="MuteWhenMinimized" enabled="true" |
46 | follows="left|top" font="SansSerifSmall" height="16" initial_value="true" | 51 | follows="left|top" font="SansSerifSmall" height="16" initial_value="true" |
47 | label="Mute audio when window minimized" left="142" mouse_opaque="true" | 52 | label="Mute audio when window minimized" left="142" mouse_opaque="true" |