From 4ff18ef8f95f4c8ae68623e2a2ec1b8e4de75d13 Mon Sep 17 00:00:00 2001 From: mrwastl Date: Sun, 29 May 2011 18:03:56 +0200 Subject: added new tokens ForegroundColor / BackgroundColor --- skinconfig.c | 20 ++++++++++++++++++-- 1 file 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: -- cgit v1.2.3