FireBirdLib - Topfield TMS PVR TAP Programming Library
OSDMenuScrollPageDown.c
Go to the documentation of this file.
1
#include "
FBLib_TMSOSDMenu.h
"
2
3
int
OSDMenuScrollPageDown
(
void
)
4
{
5
TRACEENTER
();
6
7
tMenu
*pMenu;
8
int
ret, x;
9
10
pMenu = &
Menu
[
CurrentMenuLevel
];
11
12
if
((pMenu->
CurrentSelection
== (pMenu->
NrItems
- 1)) && pMenu->
ScrollLoop
)
13
{
14
ret =
OSDMenuFindNextSelectableEntry
(-1);
15
}
16
else
if
(pMenu->
CurrentSelection
== (pMenu->
CurrentTopIndex
+ pMenu->
NrLines
- 1))
17
{
18
x = pMenu->
CurrentSelection
+ pMenu->
NrLines
- 1;
19
if
(x >= pMenu->
NrItems
) x = pMenu->
NrItems
- 2;
20
if
(x < (pMenu->
NrItems
- 1))
21
ret =
OSDMenuFindNextSelectableEntry
(x);
22
else
23
ret = x;
24
}
25
else
26
{
27
x = pMenu->
CurrentSelection
+ pMenu->
NrLines
- 2 - (pMenu->
CurrentSelection
- pMenu->
CurrentTopIndex
);
28
if
(x >= pMenu->
NrItems
) x = pMenu->
NrItems
- 2;
29
ret =
OSDMenuFindNextSelectableEntry
(x);
30
}
31
32
if
(ret == -1)
33
{
34
TRACEEXIT
();
35
return
-1;
36
}
37
38
pMenu->
CurrentSelection
= ret;
39
ListDirty
= TRUE;
40
41
TRACEEXIT
();
42
return
ret;
43
}
FBLib_TMSOSDMenu.h
Menu
tMenu Menu[NRMENULEVELS]
Definition:
OSDMenuInit.c:6
CurrentMenuLevel
dword CurrentMenuLevel
Definition:
OSDMenuInit.c:7
ListDirty
bool ListDirty
Definition:
FBLib_TMSOSDMenu.h:223
OSDMenuScrollPageDown
int OSDMenuScrollPageDown(void)
Definition:
OSDMenuScrollPageDown.c:3
OSDMenuFindNextSelectableEntry
int OSDMenuFindNextSelectableEntry(int CurrentSelection)
Definition:
OSDMenuFindNextSelectableEntry.c:3
TRACEEXIT
#define TRACEEXIT()
Definition:
libFireBird.h:1244
TRACEENTER
#define TRACEENTER()
Definition:
libFireBird.h:1243
tMenu
Definition:
FBLib_TMSOSDMenu.h:67
tMenu::CurrentSelection
int CurrentSelection
Definition:
FBLib_TMSOSDMenu.h:74
tMenu::NrLines
int NrLines
Definition:
FBLib_TMSOSDMenu.h:70
tMenu::CurrentTopIndex
int CurrentTopIndex
Definition:
FBLib_TMSOSDMenu.h:75
tMenu::NrItems
int NrItems
Definition:
FBLib_TMSOSDMenu.h:72
tMenu::ScrollLoop
bool ScrollLoop
Definition:
FBLib_TMSOSDMenu.h:80
TMSOSDMenu
OSDMenuScrollPageDown.c
Generated on Fri Apr 29 2022 13:34:01 for FireBirdLib - Topfield TMS PVR TAP Programming Library by
1.9.3