summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2013-01-05 00:19:16 +0100
committerlouis <louis.braun@gmx.de>2013-01-05 00:19:16 +0100
commit87fb0024bd4fcd32c413ab3c0fcb8b6323cb7c33 (patch)
tree49bf133e226521521360776bafa2e66993828993
parent4d292ceab169367ba1898aafeecf077f83f59365 (diff)
downloadskin-nopacity-87fb0024bd4fcd32c413ab3c0fcb8b6323cb7c33.tar.gz
skin-nopacity-87fb0024bd4fcd32c413ab3c0fcb8b6323cb7c33.tar.bz2
Fixed displaying configurable color buttons
-rw-r--r--displaymenu.c31
-rw-r--r--displaymenuview.c10
2 files changed, 19 insertions, 22 deletions
diff --git a/displaymenu.c b/displaymenu.c
index 057c7db..cc48864 100644
--- a/displaymenu.c
+++ b/displaymenu.c
@@ -215,26 +215,25 @@ void cNopacityDisplayMenu::SetTitle(const char *Title) {
}
void cNopacityDisplayMenu::SetButtons(const char *Red, const char *Green, const char *Yellow, const char *Blue) {
- tColor lutBg[] = { Theme.Color(clrButtonRedBorder), Theme.Color(clrButtonGreenBorder), Theme.Color(clrButtonYellowBorder), Theme.Color(clrButtonBlueBorder) };
if (Red) {
- menuView->DrawButton(Red, handleButtons[0], lutBg[Setup.ColorKey0], 0);
- } else
- menuView->ClearButton(0);
-
+ menuView->DrawButton(Red, handleButtons[0], Theme.Color(clrButtonRedBorder), Setup.ColorKey0);
+ } else
+ menuView->ClearButton(Setup.ColorKey0);
+
if (Green) {
- menuView->DrawButton(Green, handleButtons[1], lutBg[Setup.ColorKey1], 1);
- } else
- menuView->ClearButton(1);
-
+ menuView->DrawButton(Green, handleButtons[1], Theme.Color(clrButtonGreenBorder), Setup.ColorKey1);
+ } else
+ menuView->ClearButton(Setup.ColorKey1);
+
if (Yellow) {
- menuView->DrawButton(Yellow, handleButtons[2], lutBg[Setup.ColorKey2], 2);
- } else
- menuView->ClearButton(2);
-
+ menuView->DrawButton(Yellow, handleButtons[2], Theme.Color(clrButtonYellowBorder), Setup.ColorKey2);
+ } else
+ menuView->ClearButton(Setup.ColorKey2);
+
if (Blue) {
- menuView->DrawButton(Blue, handleButtons[3], lutBg[Setup.ColorKey3], 3);
- } else
- menuView->ClearButton(3);
+ menuView->DrawButton(Blue, handleButtons[3], Theme.Color(clrButtonBlueBorder), Setup.ColorKey3);
+ } else
+ menuView->ClearButton(Setup.ColorKey3);
}
void cNopacityDisplayMenu::SetMessage(eMessageType Type, const char *Text) {
diff --git a/displaymenuview.c b/displaymenuview.c
index 31c4914..af5992e 100644
--- a/displaymenuview.c
+++ b/displaymenuview.c
@@ -290,15 +290,13 @@ void cNopacityDisplayMenuView::CreateBackgroundImages(int *handleBackgrounds, in
imgLoader.DrawBackground(Theme.Color(clrMenuItemHigh), Theme.Color(clrMenuItemHighBlend), menuItemWidthMain-2, menuItemHeightRecordings-2);
handleBackgrounds[7] = cOsdProvider::StoreImage(imgLoader.GetImage());
- tColor lutBg[] = { Theme.Color(clrButtonRed), Theme.Color(clrButtonGreen), Theme.Color(clrButtonYellow), Theme.Color(clrButtonBlue) };
-
- imgLoader.DrawBackground(Theme.Color(clrMenuBack), lutBg[Setup.ColorKey0], buttonWidth-4, buttonHeight-4);
+ imgLoader.DrawBackground(Theme.Color(clrMenuBack), Theme.Color(clrButtonRed), buttonWidth-4, buttonHeight-4);
handleButtons[0] = cOsdProvider::StoreImage(imgLoader.GetImage());
- imgLoader.DrawBackground(Theme.Color(clrMenuBack), lutBg[Setup.ColorKey1], buttonWidth-4, buttonHeight-4);
+ imgLoader.DrawBackground(Theme.Color(clrMenuBack), Theme.Color(clrButtonGreen), buttonWidth-4, buttonHeight-4);
handleButtons[1] = cOsdProvider::StoreImage(imgLoader.GetImage());
- imgLoader.DrawBackground(Theme.Color(clrMenuBack), lutBg[Setup.ColorKey2], buttonWidth-4, buttonHeight-4);
+ imgLoader.DrawBackground(Theme.Color(clrMenuBack), Theme.Color(clrButtonYellow), buttonWidth-4, buttonHeight-4);
handleButtons[2] = cOsdProvider::StoreImage(imgLoader.GetImage());
- imgLoader.DrawBackground(Theme.Color(clrMenuBack), lutBg[Setup.ColorKey3], buttonWidth-4, buttonHeight-4);
+ imgLoader.DrawBackground(Theme.Color(clrMenuBack), Theme.Color(clrButtonBlue), buttonWidth-4, buttonHeight-4);
handleButtons[3] = cOsdProvider::StoreImage(imgLoader.GetImage());
}