summaryrefslogtreecommitdiff
path: root/lcarsng.c
diff options
context:
space:
mode:
authorkamel5 <vdr.kamel5 (at) gmx (dot) net>2019-07-22 12:33:19 +0200
committerkamel5 <vdr.kamel5 (at) gmx (dot) net>2019-07-22 14:52:00 +0200
commit027961e2ce7f20a9db208c6e774efad225e5628a (patch)
tree62571d28a7f154656b6911e38ac2c722ce4457ce /lcarsng.c
parent30a6ec85d3738fca98ce80ed305f0d83a81eb3e0 (diff)
downloadskin-lcarsng-027961e2ce7f20a9db208c6e774efad225e5628a.tar.gz
skin-lcarsng-027961e2ce7f20a9db208c6e774efad225e5628a.tar.bz2
Separate displaymessage
Diffstat (limited to 'lcarsng.c')
-rw-r--r--lcarsng.c57
1 files changed, 1 insertions, 56 deletions
diff --git a/lcarsng.c b/lcarsng.c
index 2e88fd7..1e7a570 100644
--- a/lcarsng.c
+++ b/lcarsng.c
@@ -26,6 +26,7 @@
#include "lcarsng.h"
#include "displaychannel.h"
#include "displaymenu.h"
+#include "displaymessage.h"
#include "displayreplay.h"
#include "displaytracks.h"
#include <vdr/font.h>
@@ -340,62 +341,6 @@ void cLCARSNGDisplayVolume::Flush(void)
osd->Flush();
}
-// --- cLCARSNGDisplayMessage ----------------------------------------------
-
-class cLCARSNGDisplayMessage : public cSkinDisplayMessage {
-private:
- cOsd *osd;
- int x0, x1, x2, x3, x4, x5, x6, x7;
- int y0, y1;
-public:
- cLCARSNGDisplayMessage(void);
- virtual ~cLCARSNGDisplayMessage();
- virtual void SetMessage(eMessageType Type, const char *Text);
- virtual void Flush(void);
- };
-
-cLCARSNGDisplayMessage::cLCARSNGDisplayMessage(void)
-{
- const cFont *font = cFont::GetFont(fontOsd);
- int lineHeight = font->Height();
- x0 = 0;
- x1 = lineHeight / 2;
- x2 = lineHeight;
- x3 = x2 + Gap;
- x7 = cOsd::OsdWidth();
- x6 = x7 - lineHeight / 2;
- x5 = x6 - lineHeight / 2;
- x4 = x5 - Gap;
- y0 = 0;
- y1 = lineHeight;
- osd = CreateOsd(cOsd::OsdLeft(), cOsd::OsdTop() + cOsd::OsdHeight() - y1, x0, y0, x7 - 1, y1 - 1);
-}
-
-cLCARSNGDisplayMessage::~cLCARSNGDisplayMessage()
-{
- delete osd;
- cDevice::PrimaryDevice()->ScaleVideo(cRect::Null);
-}
-
-void cLCARSNGDisplayMessage::SetMessage(eMessageType Type, const char *Text)
-{
- tColor ColorFg = Theme.Color(clrMessageStatusFg + 2 * Type);
- tColor ColorBg = Theme.Color(clrMessageStatusBg + 2 * Type);
- osd->DrawRectangle(x0, y0, x7 - 1, y1 - 1, Theme.Color(clrBackground));
- osd->DrawRectangle(x0, y0, x1 - 1, y1 - 1, clrTransparent);
- osd->DrawEllipse (x0, y0, x1 - 1, y1 - 1, ColorBg, 7);
- osd->DrawRectangle(x1, y0, x2 - 1, y1 - 1, ColorBg);
- osd->DrawText(x3, y0, Text, ColorFg, ColorBg, cFont::GetFont(fontSml), x4 - x3, y1 - y0, taCenter);
- osd->DrawRectangle(x5, y0, x6 - 1, y1 - 1, ColorBg);
- osd->DrawRectangle(x6, y0, x7 - 1, y1 - 1, clrTransparent);
- osd->DrawEllipse (x6, y0, x7 - 1, y1 - 1, ColorBg, 5);
-}
-
-void cLCARSNGDisplayMessage::Flush(void)
-{
- osd->Flush();
-}
-
// --- cLCARSNG ------------------------------------------------------------
cLCARSNG::cLCARSNG(void)