diff options
Diffstat (limited to 'recmenuitem.c')
-rw-r--r-- | recmenuitem.c | 53 |
1 files changed, 17 insertions, 36 deletions
diff --git a/recmenuitem.c b/recmenuitem.c index 5b650a5..cc7d7f8 100644 --- a/recmenuitem.c +++ b/recmenuitem.c @@ -300,19 +300,15 @@ cRecMenuItemInt::cRecMenuItemInt(cString text, int initialVal, int minVal, int maxVal, -// bool refresh; bool active, int *callback, - eRecMenuState action, - int indent) { + eRecMenuState action) { selectable = true; this->text = text; this->currentVal = initialVal; this->minVal = minVal; this->maxVal = maxVal; -// this->refresh = refresh; this->active = active; - this->indent = indent; this->callback = callback; this->action = action; height = 3 * font->Height() / 2; @@ -352,7 +348,7 @@ void cRecMenuItemInt::setBackground() { void cRecMenuItemInt::Draw(void) { int textY = (height - font->Height()) / 2; - pixmap->DrawText(cPoint(10 + indent * 30, textY), *text, colorText, colorTextBack, font); + pixmap->DrawText(cPoint(10, textY), *text, colorText, colorTextBack, font); DrawValue(); } @@ -411,18 +407,16 @@ eRecMenuState cRecMenuItemInt::ProcessKey(eKeys Key) { // --- cRecMenuItemBool ------------------------------------------------------- cRecMenuItemBool::cRecMenuItemBool(cString text, bool initialVal, - bool refresh, bool active, bool *callback, eRecMenuState action, - int indent) { + bool refresh) { selectable = true; this->text = text; this->yes = initialVal; this->refresh = refresh; this->active = active; this->callback = callback; - this->indent = indent; this->action = action; height = 3 * font->Height() / 2; pixmapVal = NULL; @@ -430,18 +424,16 @@ cRecMenuItemBool::cRecMenuItemBool(cString text, cRecMenuItemBool::cRecMenuItemBool(cString text, bool initialVal, - bool refresh, bool active, int *callback, eRecMenuState action, - int indent) { + bool refresh) { selectable = true; this->text = text; this->yes = initialVal; this->refresh = refresh; this->active = active; this->callback = (bool*)callback; - this->indent = indent; this->action = action; height = 3 * font->Height() / 2; pixmapVal = NULL; @@ -474,13 +466,13 @@ void cRecMenuItemBool::Show(void) { void cRecMenuItemBool::Draw(void) { int textY = (height - font->Height()) / 2; - pixmap->DrawText(cPoint(10 + indent * 30, textY), *text, colorText, colorTextBack, font); + pixmap->DrawText(cPoint(10, textY), *text, colorText, colorTextBack, font); DrawValue(); } void cRecMenuItemBool::DrawValue(void) { pixmapVal->Fill(clrTransparent); - std::string strIcon = yes?"yes":"no"; + std::string strIcon = yes ? "yes" : "no"; int iconSize = height - 8; int iconX = width - iconSize - 10; int iconY = (height - iconSize) / 2; @@ -519,8 +511,7 @@ cRecMenuItemSelect::cRecMenuItemSelect(cString text, bool active, int *callback, eRecMenuState action, - bool refresh, - int indent) { + bool refresh) { selectable = true; this->text = text; strings = Strings; @@ -532,7 +523,6 @@ cRecMenuItemSelect::cRecMenuItemSelect(cString text, this->active = active; this->callback = callback; this->refresh = refresh; - this->indent = indent; this->action = action; height = 3 * font->Height() / 2; pixmapVal = NULL; @@ -565,7 +555,7 @@ void cRecMenuItemSelect::Show(void) { void cRecMenuItemSelect::Draw(void) { int textY = (height - font->Height()) / 2; - pixmap->DrawText(cPoint(10 + indent * 30, textY), *text, colorText, colorTextBack, font); + pixmap->DrawText(cPoint(10, textY), *text, colorText, colorTextBack, font); DrawValue(); } @@ -629,14 +619,12 @@ cRecMenuItemSelectDirectory::cRecMenuItemSelectDirectory(cString text, bool active, char *callback, eRecMenuState action, - bool isSearchTimer, - int indent) { + bool isSearchTimer) { selectable = true; this->text = text; this->originalFolder = originalFolder; this->active = active; this->callback = callback; - this->indent = indent; this->action = action; height = 3 * font->Height() / 2; pixmapVal = NULL; @@ -675,14 +663,14 @@ void cRecMenuItemSelectDirectory::Show(void) { void cRecMenuItemSelectDirectory::Draw(void) { int textY = (height - font->Height()) / 2; - pixmap->DrawText(cPoint(10 + indent * 30, textY), *text, colorText, colorTextBack, font); + pixmap->DrawText(cPoint(10, textY), *text, colorText, colorTextBack, font); DrawValue(); } void cRecMenuItemSelectDirectory::DrawValue(void) { pixmapVal->Fill(clrTransparent); int iconSize = min(128, height); - int textX = std::max(width - font->Width(folders[currentVal].c_str()) - iconSize, 10 + indent * 30 + font->Width(*text) + 2 * iconSize); + int textX = std::max(width - font->Width(folders[currentVal].c_str()) - iconSize, 10 + font->Width(*text) + 2 * iconSize); int textY = (height - font->Height()) / 2; pixmapVal->DrawText(cPoint(textX, textY), folders[currentVal].c_str(), colorText, clrTransparent, font, width - textX - iconSize, font->Height(), taTop | taRight); int iconLeftX = textX - iconSize; @@ -1326,8 +1314,7 @@ cRecMenuItemTime::cRecMenuItemTime(cString text, int initialVal, bool active, int *callback, - eRecMenuState action, - int indent) { + eRecMenuState action) { selectable = true; this->text = text; this->value = initialVal; @@ -1337,7 +1324,6 @@ cRecMenuItemTime::cRecMenuItemTime(cString text, fresh = true; this->active = active; this->callback = callback; - this->indent = indent; this->action = action; height = 3 * font->Height() / 2; pixmapVal = NULL; @@ -1370,7 +1356,7 @@ void cRecMenuItemTime::Show(void) { void cRecMenuItemTime::Draw(void) { int textY = (height - font->Height()) / 2; - pixmap->DrawText(cPoint(10 + indent * 30, textY), *text, colorText, colorTextBack, font); + pixmap->DrawText(cPoint(10, textY), *text, colorText, colorTextBack, font); DrawValue(); } @@ -1960,8 +1946,7 @@ cRecMenuItemChannelChooser::cRecMenuItemChannelChooser(cString text, const cChannel *initialChannel, bool active, int *callback, - eRecMenuState action, - int indent) { + eRecMenuState action) { selectable = true; this->text = text; this->channel = initialChannel; @@ -1973,10 +1958,8 @@ cRecMenuItemChannelChooser::cRecMenuItemChannelChooser(cString text, fresh = true; this->active = active; this->callback = callback; - this->indent = indent; this->action = action; height = 3 * font->Height() / 2; -// height = 2 * font->Height(); pixmapChannel = NULL; } @@ -2007,7 +1990,7 @@ void cRecMenuItemChannelChooser::Show(void) { void cRecMenuItemChannelChooser::Draw(void) { int textY = (height - font->Height()) / 2; - pixmap->DrawText(cPoint(10 + indent * 30, textY), *text, colorText, colorTextBack, font); + pixmap->DrawText(cPoint(10, textY), *text, colorText, colorTextBack, font); DrawValue(); } @@ -2137,8 +2120,7 @@ eRecMenuState cRecMenuItemChannelChooser::ProcessKey(eKeys Key) { cRecMenuItemDayChooser::cRecMenuItemDayChooser(cString text, int weekdays, bool active, - int *callback, - int indent) { + int *callback) { selectable = true; this->text = text; if (weekdays < 1) @@ -2146,7 +2128,6 @@ cRecMenuItemDayChooser::cRecMenuItemDayChooser(cString text, this->weekdays = weekdays; this->active = active; this->callback = callback; - this->indent = indent; height = 3 * font->Height() / 2; selectedDay = 0; pixmapWeekdays = NULL; @@ -2209,7 +2190,7 @@ void cRecMenuItemDayChooser::setBackground() { void cRecMenuItemDayChooser::Draw(void) { int textY = (height - font->Height()) / 2; - pixmap->DrawText(cPoint(10 + indent * 30, textY), *text, colorText, colorTextBack, font); + pixmap->DrawText(cPoint(10, textY), *text, colorText, colorTextBack, font); DrawDays(); } |