FireBirdLib - Topfield TMS PVR TAP Programming Library
OSDMenuColorPickerShow.c
Go to the documentation of this file.
1#include <string.h>
2#include "FBLib_TMSOSDMenu.h"
3
4void OSDMenuColorPickerShow(const char *Title, dword Color)
5{
7
8 dword x, y;
9 tOSDMapInfo *OSDMapInfo;
10
12 ColorPickerColor = Color;
17
19 {
20 x = (720 - _ColorPicker_Gd.width) >> 1;
21 y = (576 - _ColorPicker_Gd.height) >> 1;
22 if(OSDRgn || MyOSDRgn)
23 {
26 if(MyOSDRgn)
27 {
28 OSDMapInfo = (tOSDMapInfo*) FIS_vOsdMap();
29 if(OSDMapInfo)
30 InfoBoxSaveArea = TAP_Osd_SaveBox(MyOSDRgn, InfoBoxSaveAreaX - OSDMapInfo[MyOSDRgn].x, InfoBoxSaveAreaY - OSDMapInfo[MyOSDRgn].y, _InfoBox_Gd.width, _InfoBox_Gd.height);
31 }
32 else
34 }
35
36 ColorPickerOSDRgn = TAP_Osd_Create(x, y, _ColorPicker_Gd.width, _ColorPicker_Gd.height, 0, 0);
37 TAP_ExitNormal();
38 }
39 TAP_Osd_PutGd(ColorPickerOSDRgn, 0, 0, &_ColorPicker_Gd, FALSE);
40
41 OSDMenuPutS(ColorPickerOSDRgn, 0, 10, 380, Title, RGB(232,146,17), COLOR_None, 14, FALSE, ALIGN_CENTER);
42
43 x = 10;
44 TAP_Osd_PutGd(ColorPickerOSDRgn, x , 118, &_Button_red_Gd, TRUE);
45 x += (_Button_red_Gd.width + 2);
46 TAP_Osd_PutGd(ColorPickerOSDRgn, x , 118, &_Button_green_Gd, TRUE);
47 x += (_Button_green_Gd.width + 2);
48 TAP_Osd_PutGd(ColorPickerOSDRgn, x , 118, &_Button_blue_Gd, TRUE);
49 x += (_Button_blue_Gd.width + 5);
50 TAP_Osd_PutGd(ColorPickerOSDRgn, x , 118, &_Button_ok_Gd, TRUE);
51 x += (_Button_ok_Gd.width + 5);
52 TAP_Osd_PutGd(ColorPickerOSDRgn, x , 118, &_Button_exit_Gd, TRUE);
53
57
58 TAP_Osd_Sync();
59
60 TRACEEXIT();
61}
int ColorPickerLastCursorBlue
int ColorPickerLastCursorRed
Definition: OSDMenuInit.c:31
int ColorPickerLastCursorGreen
dword InfoBoxSaveAreaX
Definition: OSDMenuInit.c:15
TYPE_GrData _Button_exit_Gd
void OSDMenuColorPickerDrawCursor(tCurrentColorSelected CursorColor, bool Selected)
TYPE_GrData _Button_ok_Gd
TYPE_GrData _Button_green_Gd
void OSDMenuPutS(word rgn, dword x, dword y, dword maxX, const char *str, dword fcolor, dword bcolor, byte fntSize, byte bDot, byte align)
Definition: OSDMenuPutS.c:3
TYPE_GrData _ColorPicker_Gd
tCurrentColorSelected CurrentColorSelected
Definition: OSDMenuInit.c:30
TYPE_GrData _Button_red_Gd
TYPE_GrData _InfoBox_Gd
byte * InfoBoxSaveArea
Definition: OSDMenuInit.c:14
TYPE_GrData _Button_blue_Gd
word ColorPickerOSDRgn
Definition: OSDMenuInit.c:27
word OSDRgn
Definition: OSDMenuInit.c:4
word MyOSDRgn
Definition: OSDMenuInit.c:4
dword ColorPickerDefaultColor
Definition: OSDMenuInit.c:29
@ CCS_Green
@ CCS_Red
@ CCS_Blue
dword InfoBoxSaveAreaY
dword ColorPickerColor
Definition: OSDMenuInit.c:28
dword FIS_vOsdMap(void)
Definition: FIS_vOSDMap.c:3
void OSDMenuColorPickerShow(const char *Title, dword Color)
#define TRACEEXIT()
Definition: libFireBird.h:1244
#define TRACEENTER()
Definition: libFireBird.h:1243