FireBirdLib - Topfield TMS PVR TAP Programming Library
OSDMenuItemModifyValue.c
Go to the documentation of this file.
1#include <string.h>
2#include "FBLib_TMSOSDMenu.h"
3
4bool OSDMenuItemModifyValue(int ItemIndex, const char *Text)
5{
7
8 tMenu *pMenu;
9
10 pMenu = &Menu[CurrentMenuLevel];
11
12 if((ItemIndex < 0) || (ItemIndex >= pMenu->NrItems))
13 {
14 TRACEEXIT();
15 return FALSE;
16 }
17
18 if(!Text)
19 {
20 TRACEEXIT();
21 return FALSE;
22 }
23
24 strncpy(pMenu->Item[ItemIndex].Value, Text, ITEMNAMESIZE);
25 pMenu->Item[ItemIndex].Value[ITEMNAMESIZE - 1] = '\0';
26
27 ListDirty = TRUE;
28
29 TRACEEXIT();
30 return TRUE;
31}
#define ITEMNAMESIZE
tMenu Menu[NRMENULEVELS]
Definition: OSDMenuInit.c:6
dword CurrentMenuLevel
Definition: OSDMenuInit.c:7
bool ListDirty
bool OSDMenuItemModifyValue(int ItemIndex, const char *Text)
#define TRACEEXIT()
Definition: libFireBird.h:1244
#define TRACEENTER()
Definition: libFireBird.h:1243
char Value[ITEMVALUESIZE]
tItem * Item