diff options
author | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2020-01-30 17:25:33 +0100 |
---|---|---|
committer | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2020-03-21 11:14:41 +0100 |
commit | ddae08e88f0d63814ad4fa43f9437c046d8a8488 (patch) | |
tree | eb576e178feb8b19871e3a6fa3c14310a4d8ab9d | |
parent | 774dff988acf05e377ec54222ad0ec59110120da (diff) | |
download | skin-lcarsng-ddae08e88f0d63814ad4fa43f9437c046d8a8488.tar.gz skin-lcarsng-ddae08e88f0d63814ad4fa43f9437c046d8a8488.tar.bz2 |
Correct display cLCARSNGDisplayMenu::SetMessage
-rw-r--r-- | displaymenu.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/displaymenu.c b/displaymenu.c index b86b041..5f0923a 100644 --- a/displaymenu.c +++ b/displaymenu.c @@ -1191,9 +1191,18 @@ void cLCARSNGDisplayMenu::SetButtons(const char *Red, const char *Green, const c void cLCARSNGDisplayMenu::SetMessage(eMessageType Type, const char *Text) { if (Text) { - osd->SaveRegion(xb00, yb14 - 2 * Margin, xb15 - 1, yb15 - 1); - osd->DrawRectangle(xb00, yb14 - 2 * Margin, xb15 - 1, yb15 - 1, Theme.Color(clrMessageStatusFg + 2 * Type)); - osd->DrawText(xb00 + Margin, yb14 - Margin, Text, Theme.Color(clrMessageStatusFg + 2 * Type), Theme.Color(clrMessageStatusBg + 2 * Type), cFont::GetFont(fontSml), xb15 - xb00 - 2 * Margin, yb15 - yb14, taCenter); + tColor ColorFg = Theme.Color(clrMessageStatusFg + 2 * Type); + tColor ColorBg = Theme.Color(clrMessageStatusBg + 2 * Type); + int x0, x1, y0, y1, lx, ly; + x0 = xb00; + x1 = xb15 - 1; + y0 = yb14 - 2 * Margin; + y1 = yb15 - 1; + lx = x1 - x0 - 2 * Margin; + ly = y1 - y0 - 2 * Margin; + osd->SaveRegion(x0, y0, x1, y1); + DrawRectangleOutline(osd, x0, y0, x1, y1, ColorFg, ColorBg, 15); + osd->DrawText(x0 + Margin, y0 + Margin, Text, ColorFg, ColorBg, cFont::GetFont(fontSml), lx, ly, taCenter); } else osd->RestoreRegion(); |