FireBirdLib - Topfield TMS PVR TAP Programming Library
OSDMenuSelectTopItem.c
Go to the documentation of this file.
1#include "FBLib_TMSOSDMenu.h"
2
3bool OSDMenuSelectTopItem(int TopIndex)
4{
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(TopIndex < 0) TopIndex = 0;
18 if(TopIndex >= (int)pMenu->NrItems) TopIndex = (int)pMenu->NrItems - 1;
19
20 if(TopIndex != (int)pMenu->CurrentTopIndex)
21 {
22 pMenu->CurrentTopIndex = TopIndex;
23 ListDirty = TRUE;
24 }
25
26 TRACEEXIT();
27 return TRUE;
28}
tMenu Menu[NRMENULEVELS]
Definition: OSDMenuInit.c:6
dword CurrentMenuLevel
Definition: OSDMenuInit.c:7
bool ListDirty
bool OSDMenuSelectTopItem(int TopIndex)
#define TRACEEXIT()
Definition: libFireBird.h:1244
#define TRACEENTER()
Definition: libFireBird.h:1243
int CurrentTopIndex