From 264fa085bd2d6941ddfa1b977372a0d0cdd5d801 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 9 Jan 2005 12:08:34 +0100 Subject: Implemented displaying audio channel --- skinsttng.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'skinsttng.c') 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(); -- cgit v1.2.3