diff options
author | mrwastl <mrwastl@users.sourceforge.net> | 2011-05-29 18:03:56 +0200 |
---|---|---|
committer | mrwastl <mrwastl@users.sourceforge.net> | 2011-05-29 18:03:56 +0200 |
commit | 4ff18ef8f95f4c8ae68623e2a2ec1b8e4de75d13 (patch) | |
tree | fb65115ab1909ab4baa5b7757e0db6a9ce1a8a38 | |
parent | 76ba99cbed57fab99b4925ae4e776ebd6bdf153c (diff) | |
download | vdr-plugin-graphlcd-4ff18ef8f95f4c8ae68623e2a2ec1b8e4de75d13.tar.gz vdr-plugin-graphlcd-4ff18ef8f95f4c8ae68623e2a2ec1b8e4de75d13.tar.bz2 |
added new tokens ForegroundColor / BackgroundColor
-rw-r--r-- | skinconfig.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/skinconfig.c b/skinconfig.c index 0a28573..85f6656 100644 --- a/skinconfig.c +++ b/skinconfig.c @@ -124,6 +124,8 @@ typedef enum _eTokenId tokSkinPath, tokScreenWidth, tokScreenHeight, + tokForegroundColor, + tokBackgroundColor, tokDefaultForegroundColor, tokDefaultBackgroundColor, @@ -253,6 +255,8 @@ static const std::string Tokens[tokCountToken] = "SkinPath", "ScreenWidth", "ScreenHeight", + "ForegroundColor", + "BackgroundColor", "DefaultForegroundColor", "DefaultBackgroundColor", @@ -737,16 +741,28 @@ GLCD::cType cGraphLCDSkinConfig::GetToken(const GLCD::tSkinToken & Token) const GLCD::cBitmap * bitmap = mDisplay->GetScreen(); return bitmap->Height(); } + case tokForegroundColor: + { + char buffer[11]; + snprintf(buffer, 10, "0x%08x", (uint32_t)((mDisplay)->GetDriver()->GetForegroundColor(false))); + return buffer; + } + case tokBackgroundColor: + { + char buffer[11]; + snprintf(buffer, 10, "0x%08x", (uint32_t)((mDisplay)->GetDriver()->GetBackgroundColor(false))); + return buffer; + } case tokDefaultForegroundColor: { char buffer[11]; - snprintf(buffer, 10, "0x%08x", (uint32_t)((mDisplay)->GetDriver()->GetForegroundColor())); + snprintf(buffer, 10, "0x%08x", (uint32_t)((mDisplay)->GetDriver()->GetForegroundColor(true))); return buffer; } case tokDefaultBackgroundColor: { char buffer[11]; - snprintf(buffer, 10, "0x%08x", (uint32_t)((mDisplay)->GetDriver()->GetBackgroundColor())); + snprintf(buffer, 10, "0x%08x", (uint32_t)((mDisplay)->GetDriver()->GetBackgroundColor(true))); return buffer; } default: |