mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
The 'Left' and 'Right' keys are now used to page up and down in text displays
This commit is contained in:
parent
45180b762f
commit
25abe47a3b
3
HISTORY
3
HISTORY
@ -1103,3 +1103,6 @@ Video Disk Recorder Revision History
|
|||||||
- Fixed displaying a system message while the replay mode is being shown.
|
- Fixed displaying a system message while the replay mode is being shown.
|
||||||
- Physically removing a deleted recording if one with the same name shall be
|
- Physically removing a deleted recording if one with the same name shall be
|
||||||
deleted again.
|
deleted again.
|
||||||
|
- The "Left" and "Right" keys are now used to page up and down in text displays
|
||||||
|
(like the EPG descriptions or the results of commands executed from the
|
||||||
|
"Commands" menu).
|
||||||
|
22
menu.c
22
menu.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: menu.c 1.167 2002/03/16 11:29:58 kls Exp $
|
* $Id: menu.c 1.168 2002/03/16 14:03:38 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
@ -933,8 +933,8 @@ public:
|
|||||||
virtual void Display(int Offset = -1, eDvbColor FgColor = clrWhite, eDvbColor BgColor = clrBackground);
|
virtual void Display(int Offset = -1, eDvbColor FgColor = clrWhite, eDvbColor BgColor = clrBackground);
|
||||||
bool CanScrollUp(void) { return offset > 0; }
|
bool CanScrollUp(void) { return offset > 0; }
|
||||||
bool CanScrollDown(void) { return h + offset < lines; }
|
bool CanScrollDown(void) { return h + offset < lines; }
|
||||||
void ScrollUp(void);
|
void ScrollUp(bool Page);
|
||||||
void ScrollDown(void);
|
void ScrollDown(bool Page);
|
||||||
virtual eOSState ProcessKey(eKeys Key);
|
virtual eOSState ProcessKey(eKeys Key);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -993,20 +993,20 @@ void cMenuTextItem::Display(int Offset, eDvbColor FgColor, eDvbColor BgColor)
|
|||||||
if (CanScrollDown()) Interface->Write(x + w - 1, y + h - 1, "v", bgColor, fgColor);
|
if (CanScrollDown()) Interface->Write(x + w - 1, y + h - 1, "v", bgColor, fgColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cMenuTextItem::ScrollUp(void)
|
void cMenuTextItem::ScrollUp(bool Page)
|
||||||
{
|
{
|
||||||
if (CanScrollUp()) {
|
if (CanScrollUp()) {
|
||||||
Clear();
|
Clear();
|
||||||
offset--;
|
offset = max(offset - (Page ? h : 1), 0);
|
||||||
Display();
|
Display();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void cMenuTextItem::ScrollDown(void)
|
void cMenuTextItem::ScrollDown(bool Page)
|
||||||
{
|
{
|
||||||
if (CanScrollDown()) {
|
if (CanScrollDown()) {
|
||||||
Clear();
|
Clear();
|
||||||
offset++;
|
offset = min(offset + (Page ? h : 1), lines - h);
|
||||||
Display();
|
Display();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1014,10 +1014,14 @@ void cMenuTextItem::ScrollDown(void)
|
|||||||
eOSState cMenuTextItem::ProcessKey(eKeys Key)
|
eOSState cMenuTextItem::ProcessKey(eKeys Key)
|
||||||
{
|
{
|
||||||
switch (Key) {
|
switch (Key) {
|
||||||
|
case kLeft|k_Repeat:
|
||||||
|
case kLeft:
|
||||||
case kUp|k_Repeat:
|
case kUp|k_Repeat:
|
||||||
case kUp: ScrollUp(); break;
|
case kUp: ScrollUp(NORMALKEY(Key) == kLeft); break;
|
||||||
|
case kRight|k_Repeat:
|
||||||
|
case kRight:
|
||||||
case kDown|k_Repeat:
|
case kDown|k_Repeat:
|
||||||
case kDown: ScrollDown(); break;
|
case kDown: ScrollDown(NORMALKEY(Key) == kRight); break;
|
||||||
default: return osUnknown;
|
default: return osUnknown;
|
||||||
}
|
}
|
||||||
return osContinue;
|
return osContinue;
|
||||||
|
Loading…
Reference in New Issue
Block a user