mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
changed event result lists that it is possible to scroll page up and down directly with left / right
This commit is contained in:
parent
acb0580522
commit
4b0f4184cf
3
HISTORY
3
HISTORY
@ -124,3 +124,6 @@ Version 1.2.0
|
|||||||
- fixed a bug when scrolling page up and the menu footer is active
|
- fixed a bug when scrolling page up and the menu footer is active
|
||||||
- order of search timers in search timer list in alphabetical order
|
- order of search timers in search timer list in alphabetical order
|
||||||
- changed order of actions on search timer menu items
|
- changed order of actions on search timer menu items
|
||||||
|
- changed event result lists that it is possible to scroll page up and
|
||||||
|
down directly with left / right. A recording is triggered now with the
|
||||||
|
red key.
|
||||||
|
@ -574,6 +574,13 @@ void cRecMenu::Show(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void cRecMenu::UpdateActiveMenuItem(void) {
|
||||||
|
cRecMenuItem *activeItem = GetActiveMenuItem();
|
||||||
|
if (activeItem)
|
||||||
|
activeItem->Draw();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void cRecMenu::DrawScrollBar(void) {
|
void cRecMenu::DrawScrollBar(void) {
|
||||||
pixmapScrollBar->Fill(theme.Color(clrBorder));
|
pixmapScrollBar->Fill(theme.Color(clrBorder));
|
||||||
pixmapScrollBar->DrawRectangle(cRect(2,2,pixmapScrollBar->ViewPort().Width()-4, pixmapScrollBar->ViewPort().Height() - 4), theme.Color(clrBackground));
|
pixmapScrollBar->DrawRectangle(cRect(2,2,pixmapScrollBar->ViewPort().Width()-4, pixmapScrollBar->ViewPort().Height() - 4), theme.Color(clrBackground));
|
||||||
|
@ -60,6 +60,7 @@ public:
|
|||||||
void Display(bool scroll = false);
|
void Display(bool scroll = false);
|
||||||
void Hide(void);
|
void Hide(void);
|
||||||
void Show(void);
|
void Show(void);
|
||||||
|
void UpdateActiveMenuItem(void);
|
||||||
virtual eRecMenuState ProcessKey(eKeys Key);
|
virtual eRecMenuState ProcessKey(eKeys Key);
|
||||||
};
|
};
|
||||||
#endif //__TVGUIDE_RECMENU_H
|
#endif //__TVGUIDE_RECMENU_H
|
@ -1846,15 +1846,6 @@ void cRecMenuItemEvent::Draw(void) {
|
|||||||
pixmapText->DrawText(cPoint(textX, textHeightLine1), *info, colorText, clrTransparent, fontSmall);
|
pixmapText->DrawText(cPoint(textX, textHeightLine1), *info, colorText, clrTransparent, fontSmall);
|
||||||
pixmapText->DrawText(cPoint(textX, textHeightLine2), *title, colorText, clrTransparent, font);
|
pixmapText->DrawText(cPoint(textX, textHeightLine2), *title, colorText, clrTransparent, font);
|
||||||
pixmapText->DrawText(cPoint(textX, textHeightLine3), *desc, colorText, clrTransparent, fontSmall);
|
pixmapText->DrawText(cPoint(textX, textHeightLine3), *desc, colorText, clrTransparent, fontSmall);
|
||||||
|
|
||||||
if (event->HasTimer()) {
|
|
||||||
int iconSize = height / 2;
|
|
||||||
int iconY = (height - iconSize) / 2;
|
|
||||||
cImage *imgHasTimer = imgCache.GetIcon("activetimer", iconSize, iconSize);
|
|
||||||
if (imgHasTimer) {
|
|
||||||
pixmapIcons->DrawImage(cPoint(width - iconSize - 10, iconY), *imgHasTimer);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int cRecMenuItemEvent::DrawIcons(void) {
|
int cRecMenuItemEvent::DrawIcons(void) {
|
||||||
@ -1862,28 +1853,33 @@ int cRecMenuItemEvent::DrawIcons(void) {
|
|||||||
int iconsX = 10;
|
int iconsX = 10;
|
||||||
int iconSize = height / 2;
|
int iconSize = height / 2;
|
||||||
int iconY = (height - iconSize) / 2;
|
int iconY = (height - iconSize) / 2;
|
||||||
std::string iconInfo, iconRecord;
|
std::string iconInfo;
|
||||||
if (active) {
|
if (active) {
|
||||||
iconInfo = (iconActive==0)?"info_active":"info_inactive";
|
iconInfo = (iconActive==0)?"info_active":"info_inactive";
|
||||||
if (action2 != rmsDisabled)
|
|
||||||
iconRecord = (iconActive==1)?"record_active":"record_inactive";
|
|
||||||
} else {
|
} else {
|
||||||
iconInfo = "info_inactive";
|
iconInfo = "info_inactive";
|
||||||
if (action2 != rmsDisabled)
|
|
||||||
iconRecord = "record_inactive";
|
|
||||||
}
|
}
|
||||||
cImage *imgInfo = imgCache.GetIcon(iconInfo, iconSize, iconSize);
|
cImage *imgInfo = imgCache.GetIcon(iconInfo, iconSize, iconSize);
|
||||||
if (imgInfo) {
|
if (imgInfo) {
|
||||||
pixmapIcons->DrawImage(cPoint(iconsX, iconY), *imgInfo);
|
pixmapIcons->DrawImage(cPoint(iconsX, iconY), *imgInfo);
|
||||||
iconsX += iconSize + 5;
|
iconsX += iconSize + 5;
|
||||||
}
|
}
|
||||||
if (action2 != rmsDisabled) {
|
|
||||||
cImage *imgRec = imgCache.GetIcon(iconRecord, iconSize, iconSize);
|
iconY = height - iconSize - 10;
|
||||||
|
if (event->HasTimer()) {
|
||||||
|
cImage *imgHasTimer = imgCache.GetIcon("activetimer", iconSize, iconSize);
|
||||||
|
if (imgHasTimer) {
|
||||||
|
pixmapIcons->DrawImage(cPoint(width - iconSize - 10, iconY), *imgHasTimer);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
std::string iconRec = active ? "record_active" : "record_inactive";
|
||||||
|
cImage *imgRec = imgCache.GetIcon(iconRec, iconSize, iconSize);
|
||||||
if (imgRec) {
|
if (imgRec) {
|
||||||
pixmapIcons->DrawImage(cPoint(iconsX, iconY), *imgRec);
|
pixmapIcons->DrawImage(cPoint(width - iconSize - 10, iconY), *imgRec);
|
||||||
iconsX += iconSize + 5;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return iconsX;
|
return iconsX;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1902,36 +1898,11 @@ void cRecMenuItemEvent::Show(void) {
|
|||||||
eRecMenuState cRecMenuItemEvent::ProcessKey(eKeys Key) {
|
eRecMenuState cRecMenuItemEvent::ProcessKey(eKeys Key) {
|
||||||
bool consumed = false;
|
bool consumed = false;
|
||||||
switch (Key & ~k_Repeat) {
|
switch (Key & ~k_Repeat) {
|
||||||
case kLeft:
|
|
||||||
if (action2 == rmsDisabled)
|
|
||||||
return rmsNotConsumed;
|
|
||||||
if (iconActive == 1) {
|
|
||||||
iconActive = 0;
|
|
||||||
consumed = true;
|
|
||||||
}
|
|
||||||
DrawIcons();
|
|
||||||
if (consumed)
|
|
||||||
return rmsConsumed;
|
|
||||||
else
|
|
||||||
return rmsNotConsumed;
|
|
||||||
break;
|
|
||||||
case kRight: {
|
|
||||||
if (action2 == rmsDisabled)
|
|
||||||
return rmsNotConsumed;
|
|
||||||
if (iconActive == 0) {
|
|
||||||
iconActive = 1;
|
|
||||||
consumed = true;
|
|
||||||
}
|
|
||||||
DrawIcons();
|
|
||||||
if (consumed)
|
|
||||||
return rmsConsumed;
|
|
||||||
else
|
|
||||||
return rmsNotConsumed;
|
|
||||||
break; }
|
|
||||||
case kOk:
|
case kOk:
|
||||||
if (iconActive == 0)
|
return action;
|
||||||
return action;
|
break;
|
||||||
else if (iconActive == 1)
|
case kRed:
|
||||||
|
if (!event->HasTimer())
|
||||||
return action2;
|
return action2;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -544,6 +544,7 @@ eOSState cRecMenuManager::StateMachine(eRecMenuState nextState) {
|
|||||||
delete activeMenu;
|
delete activeMenu;
|
||||||
activeMenu = activeMenuBuffer;
|
activeMenu = activeMenuBuffer;
|
||||||
activeMenuBuffer = NULL;
|
activeMenuBuffer = NULL;
|
||||||
|
activeMenu->UpdateActiveMenuItem();
|
||||||
activeMenu->Show();
|
activeMenu->Show();
|
||||||
break;
|
break;
|
||||||
/**********************************************************************************************
|
/**********************************************************************************************
|
||||||
@ -718,6 +719,7 @@ eOSState cRecMenuManager::StateMachine(eRecMenuState nextState) {
|
|||||||
delete activeMenu;
|
delete activeMenu;
|
||||||
activeMenu = activeMenuBuffer2;
|
activeMenu = activeMenuBuffer2;
|
||||||
activeMenuBuffer2 = NULL;
|
activeMenuBuffer2 = NULL;
|
||||||
|
activeMenu->UpdateActiveMenuItem();
|
||||||
activeMenu->Show();
|
activeMenu->Show();
|
||||||
break;
|
break;
|
||||||
case rmsFavoritesNow:
|
case rmsFavoritesNow:
|
||||||
@ -767,6 +769,7 @@ eOSState cRecMenuManager::StateMachine(eRecMenuState nextState) {
|
|||||||
delete activeMenu;
|
delete activeMenu;
|
||||||
activeMenu = activeMenuBuffer;
|
activeMenu = activeMenuBuffer;
|
||||||
activeMenuBuffer = NULL;
|
activeMenuBuffer = NULL;
|
||||||
|
activeMenu->UpdateActiveMenuItem();
|
||||||
activeMenu->Show();
|
activeMenu->Show();
|
||||||
state = osContinue;
|
state = osContinue;
|
||||||
}
|
}
|
||||||
@ -795,7 +798,6 @@ void cRecMenuManager::DisplaySearchTimerList(void) {
|
|||||||
delete activeMenu;
|
delete activeMenu;
|
||||||
std::vector<cTVGuideSearchTimer> searchTimers;
|
std::vector<cTVGuideSearchTimer> searchTimers;
|
||||||
recManager->GetSearchTimers(&searchTimers);
|
recManager->GetSearchTimers(&searchTimers);
|
||||||
//std::sort(searchTimers.begin(), searchTimers.end());
|
|
||||||
activeMenu = new cRecMenuSearchTimers(searchTimers);
|
activeMenu = new cRecMenuSearchTimers(searchTimers);
|
||||||
activeMenu->Display();
|
activeMenu->Display();
|
||||||
}
|
}
|
||||||
@ -865,6 +867,7 @@ eOSState cRecMenuManager::ProcessKey(eKeys Key) {
|
|||||||
delete activeMenu;
|
delete activeMenu;
|
||||||
activeMenu = activeMenuBuffer;
|
activeMenu = activeMenuBuffer;
|
||||||
activeMenuBuffer = NULL;
|
activeMenuBuffer = NULL;
|
||||||
|
activeMenu->UpdateActiveMenuItem();
|
||||||
activeMenu->Show();
|
activeMenu->Show();
|
||||||
state = osContinue;
|
state = osContinue;
|
||||||
osdManager.flush();
|
osdManager.flush();
|
||||||
|
Loading…
Reference in New Issue
Block a user