summaryrefslogtreecommitdiff
path: root/skinsttng.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2005-01-09 12:08:34 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2005-01-09 12:08:34 +0100
commit264fa085bd2d6941ddfa1b977372a0d0cdd5d801 (patch)
treea4137fbfe750c36705393cbac8a4809670036097 /skinsttng.c
parentf79f81dfd4e5e482f251f0ae53731cd8c6a42d2f (diff)
downloadvdr-264fa085bd2d6941ddfa1b977372a0d0cdd5d801.tar.gz
vdr-264fa085bd2d6941ddfa1b977372a0d0cdd5d801.tar.bz2
Implemented displaying audio channel
Diffstat (limited to 'skinsttng.c')
-rw-r--r--skinsttng.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/skinsttng.c b/skinsttng.c
index a229838f..94a4b66f 100644
--- a/skinsttng.c
+++ b/skinsttng.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: skinsttng.c 1.11 2005/01/08 10:15:00 kls Exp $
+ * $Id: skinsttng.c 1.12 2005/01/08 15:37:55 kls Exp $
*/
// Star Trek: The Next Generation® is a registered trademark of Paramount Pictures
@@ -20,6 +20,9 @@
#include "symbols/arrowdown.xpm"
#include "symbols/arrowup.xpm"
#include "symbols/audio.xpm"
+#include "symbols/audioleft.xpm"
+#include "symbols/audioright.xpm"
+#include "symbols/audiostereo.xpm"
#include "symbols/dolbydigital.xpm"
#include "symbols/encrypted.xpm"
#include "symbols/ffwd.xpm"
@@ -835,14 +838,20 @@ private:
int lineHeight;
tColor frameColor;
int currentIndex;
+ static cBitmap bmAudioLeft, bmAudioRight, bmAudioStereo;
void SetItem(const char *Text, int Index, bool Current);
public:
cSkinSTTNGDisplayTracks(const char *Title, int NumTracks, const char * const *Tracks);
virtual ~cSkinSTTNGDisplayTracks();
virtual void SetTrack(int Index, const char * const *Tracks);
+ virtual void SetAudioChannel(int AudioChannel);
virtual void Flush(void);
};
+cBitmap cSkinSTTNGDisplayTracks::bmAudioLeft(audioleft_xpm);
+cBitmap cSkinSTTNGDisplayTracks::bmAudioRight(audioright_xpm);
+cBitmap cSkinSTTNGDisplayTracks::bmAudioStereo(audiostereo_xpm);
+
cSkinSTTNGDisplayTracks::cSkinSTTNGDisplayTracks(const char *Title, int NumTracks, const char * const *Tracks)
{
const cFont *font = cFont::GetFont(fontOsd);
@@ -954,6 +963,20 @@ void cSkinSTTNGDisplayTracks::SetTrack(int Index, const char * const *Tracks)
SetItem(Tracks[Index], Index, true);
}
+void cSkinSTTNGDisplayTracks::SetAudioChannel(int AudioChannel)
+{
+ cBitmap *bm = NULL;
+ switch (AudioChannel) {
+ case 0: bm = &bmAudioStereo; break;
+ case 1: bm = &bmAudioLeft; break;
+ case 2: bm = &bmAudioRight; break;
+ }
+ if (bm)
+ osd->DrawBitmap(x3 + 5, y6 + (y7 - y6 - bm->Height()) / 2, *bm, Theme.Color(clrChannelSymbolOn), frameColor);
+ else
+ osd->DrawRectangle(x3, y6, x4 - 1, y7 - 1, frameColor);
+}
+
void cSkinSTTNGDisplayTracks::Flush(void)
{
osd->Flush();