summaryrefslogtreecommitdiff
path: root/indra/newview/lloutputmonitorctrl.h
diff options
context:
space:
mode:
authorMike Antipov <mantipov@productengine.com>2010-01-14 16:48:06 +0200
committerMike Antipov <mantipov@productengine.com>2010-01-14 16:48:06 +0200
commit86769b40aac266701b56daa6c78b924aad4d3ca9 (patch)
tree708dbba9db728ebbb0fb5a411591403a170492b5 /indra/newview/lloutputmonitorctrl.h
parent6ad8674a8c5a87f438aa5ad6230396a859ba268e (diff)
Work on major bug EXT-3976 (Voice chat speaking indicators should only display when users are in the same voice channel)
-- implemented functionality to have voice indicator visible only for avatars in the same voice channel with agent All speacking indicators should be registered in LLSpeakingIndicatorManager to be provcessed for the voice channel. They should implement switchIndicator(bool) as reaction on voice state changing --HG-- branch : product-engine
Diffstat (limited to 'indra/newview/lloutputmonitorctrl.h')
-rw-r--r--indra/newview/lloutputmonitorctrl.h29
1 files changed, 28 insertions, 1 deletions
diff --git a/indra/newview/lloutputmonitorctrl.h b/indra/newview/lloutputmonitorctrl.h
index 85ea552a57..2bbfa251e9 100644
--- a/indra/newview/lloutputmonitorctrl.h
+++ b/indra/newview/lloutputmonitorctrl.h
@@ -36,6 +36,7 @@
#include "v4color.h"
#include "llview.h"
#include "llmutelist.h"
+#include "llspeakingindicatormanager.h"
class LLTextBox;
class LLUICtrlFactory;
@@ -45,7 +46,7 @@ class LLUICtrlFactory;
//
class LLOutputMonitorCtrl
-: public LLView, LLMuteListObserver
+: public LLView, public LLSpeakingIndicator, LLMuteListObserver
{
public:
struct Params : public LLInitParam::Block<Params, LLView::Params>
@@ -90,7 +91,29 @@ public:
//called by mute list
virtual void onChange();
+ /**
+ * Implementation of LLSpeakingIndicator interface.
+ * Behavior is implemented via changing visibility.
+ *
+ * If instance is in visible chain now (all parents are visible) it changes visibility
+ * and notify parent about this.
+ *
+ * Otherwise it marks an instance as dirty and stores necessary visibility.
+ * It will be applied in next draw and parent will be notified.
+ */
+ virtual void switchIndicator(bool switch_on);
+
private:
+
+ /**
+ * Notifies parent about changed visibility.
+ *
+ * Passes LLSD with "visibility_changed" => <current visibility> value.
+ * For now it is processed by LLAvatarListItem to update (reshape) its children.
+ * Implemented fo complete EXT-3976
+ */
+ void notifyParentVisibilityChanged();
+
//static LLColor4 sColorMuted;
//static LLColor4 sColorNormal;
//static LLColor4 sColorOverdriven;
@@ -117,6 +140,10 @@ private:
/** uuid of a speaker being monitored */
LLUUID mSpeakerId;
+
+ /** indicates if the instance is dirty and should notify parent */
+ bool mIsSwitchDirty;
+ bool mShouldSwitchOn;
};
#endif