FireBirdLib - Topfield TMS PVR TAP Programming Library
OSDMenuSelectItem.c
Go to the documentation of this file.
1
#include "
FBLib_TMSOSDMenu.h
"
2
3
bool
OSDMenuSelectItem
(
int
ItemIndex)
4
{
5
TRACEENTER
();
6
7
tMenu
*pMenu;
8
9
pMenu = &
Menu
[
CurrentMenuLevel
];
10
11
if
(pMenu->
NrItems
== 0)
12
{
13
TRACEEXIT
();
14
return
FALSE;
15
}
16
17
if
(ItemIndex < 0) ItemIndex = 0;
18
if
(ItemIndex >= (
int
)pMenu->
NrItems
) ItemIndex = (int)pMenu->
NrItems
- 1;
19
20
if
(ItemIndex != (
int
)pMenu->
CurrentSelection
)
21
{
22
if
(!pMenu->
Item
[ItemIndex].
Selectable
)
23
{
24
TRACEEXIT
();
25
return
FALSE;
26
}
27
28
pMenu->
CurrentSelection
= ItemIndex;
29
ListDirty
= TRUE;
30
}
31
32
TRACEEXIT
();
33
return
TRUE;
34
}
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
OSDMenuSelectItem
bool OSDMenuSelectItem(int ItemIndex)
Definition:
OSDMenuSelectItem.c:3
TRACEEXIT
#define TRACEEXIT()
Definition:
libFireBird.h:1244
TRACEENTER
#define TRACEENTER()
Definition:
libFireBird.h:1243
tItem::Selectable
bool Selectable
Definition:
FBLib_TMSOSDMenu.h:40
tMenu
Definition:
FBLib_TMSOSDMenu.h:67
tMenu::CurrentSelection
int CurrentSelection
Definition:
FBLib_TMSOSDMenu.h:74
tMenu::Item
tItem * Item
Definition:
FBLib_TMSOSDMenu.h:71
tMenu::NrItems
int NrItems
Definition:
FBLib_TMSOSDMenu.h:72
TMSOSDMenu
OSDMenuSelectItem.c
Generated on Fri Apr 29 2022 13:34:01 for FireBirdLib - Topfield TMS PVR TAP Programming Library by
1.9.3