summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorRick Pasetto <rick@lindenlab.com>2009-12-16 14:39:06 -0800
committerRick Pasetto <rick@lindenlab.com>2009-12-16 14:39:06 -0800
commita9948da80ade03523eaab1c46340313b57ee7eb6 (patch)
tree05ed21f49ca2b72b819c75cde1f8141d88b7fcb1 /indra/newview
parentaee5dc617242a1cb9d800b6d546798efdca7cd87 (diff)
DEV-41904: Have F1 key bring up context-sensitive help for media controls
Review #65 Adds help topic to media controls panel, and add handling F1 key to media focus
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llviewermediafocus.cpp12
-rw-r--r--indra/newview/skins/default/xui/en/panel_prim_media_controls.xml1
2 files changed, 12 insertions, 1 deletions
diff --git a/indra/newview/llviewermediafocus.cpp b/indra/newview/llviewermediafocus.cpp
index e04a54fbd6..a0ac9c2091 100644
--- a/indra/newview/llviewermediafocus.cpp
+++ b/indra/newview/llviewermediafocus.cpp
@@ -51,6 +51,7 @@
#include "llkeyboard.h"
#include "lltoolmgr.h"
#include "llvovolume.h"
+#include "llhelp.h"
//
// LLViewerMediaFocus
@@ -302,7 +303,7 @@ BOOL LLViewerMediaFocus::handleKey(KEY key, MASK mask, BOOL called_from_parent)
{
media_impl->handleKeyHere(key, mask);
- if (key == KEY_ESCAPE)
+ if (KEY_ESCAPE == key)
{
// Reset camera zoom in this case.
if(mFocusedImplID.notNull())
@@ -315,6 +316,15 @@ BOOL LLViewerMediaFocus::handleKey(KEY key, MASK mask, BOOL called_from_parent)
clearFocus();
}
+
+ if ( KEY_F1 == key && LLUI::sHelpImpl && mMediaControls.get())
+ {
+ std::string help_topic;
+ if (mMediaControls.get()->findHelpTopic(help_topic))
+ {
+ LLUI::sHelpImpl->showTopic(help_topic);
+ }
+ }
}
return true;
diff --git a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml
index 03528c578c..3fdfc5f672 100644
--- a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml
+++ b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml
@@ -5,6 +5,7 @@
background_visible="false"
height="200"
layout="topleft"
+ help_topic="prim_media_controls"
mouse_opaque="false"
width="800">
<string name="control_background_image_name">Inspector_Background</string>