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
4
void
OSDMenuColorPickerShow
(
const
char
*Title, dword Color)
5
{
6
TRACEENTER
();
7
8
dword x, y;
9
tOSDMapInfo
*OSDMapInfo;
10
11
ColorPickerDefaultColor
= Color;
12
ColorPickerColor
= Color;
13
CurrentColorSelected
=
CCS_Red
;
14
ColorPickerLastCursorRed
= -1;
15
ColorPickerLastCursorGreen
= -1;
16
ColorPickerLastCursorBlue
= -1;
17
18
if
(!
ColorPickerOSDRgn
)
19
{
20
x = (720 -
_ColorPicker_Gd
.width) >> 1;
21
y = (576 -
_ColorPicker_Gd
.height) >> 1;
22
if
(
OSDRgn
||
MyOSDRgn
)
23
{
24
InfoBoxSaveAreaX
= x;
25
InfoBoxSaveAreaY
= y;
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
33
InfoBoxSaveArea
= TAP_Osd_SaveBox(
OSDRgn
,
InfoBoxSaveAreaX
,
InfoBoxSaveAreaY
,
_ColorPicker_Gd
.width,
_ColorPicker_Gd
.height);
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
54
OSDMenuColorPickerDrawCursor
(
CCS_Red
, TRUE);
55
OSDMenuColorPickerDrawCursor
(
CCS_Green
, FALSE);
56
OSDMenuColorPickerDrawCursor
(
CCS_Blue
, FALSE);
57
58
TAP_Osd_Sync();
59
60
TRACEEXIT
();
61
}
FBLib_TMSOSDMenu.h
ColorPickerLastCursorBlue
int ColorPickerLastCursorBlue
Definition:
FBLib_TMSOSDMenu.h:250
ColorPickerLastCursorRed
int ColorPickerLastCursorRed
Definition:
OSDMenuInit.c:31
ColorPickerLastCursorGreen
int ColorPickerLastCursorGreen
Definition:
FBLib_TMSOSDMenu.h:250
InfoBoxSaveAreaX
dword InfoBoxSaveAreaX
Definition:
OSDMenuInit.c:15
_Button_exit_Gd
TYPE_GrData _Button_exit_Gd
OSDMenuColorPickerDrawCursor
void OSDMenuColorPickerDrawCursor(tCurrentColorSelected CursorColor, bool Selected)
Definition:
OSDMenuColorPickerDrawCursor.c:3
_Button_ok_Gd
TYPE_GrData _Button_ok_Gd
_Button_green_Gd
TYPE_GrData _Button_green_Gd
OSDMenuPutS
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
_ColorPicker_Gd
TYPE_GrData _ColorPicker_Gd
CurrentColorSelected
tCurrentColorSelected CurrentColorSelected
Definition:
OSDMenuInit.c:30
_Button_red_Gd
TYPE_GrData _Button_red_Gd
_InfoBox_Gd
TYPE_GrData _InfoBox_Gd
InfoBoxSaveArea
byte * InfoBoxSaveArea
Definition:
OSDMenuInit.c:14
_Button_blue_Gd
TYPE_GrData _Button_blue_Gd
ColorPickerOSDRgn
word ColorPickerOSDRgn
Definition:
OSDMenuInit.c:27
OSDRgn
word OSDRgn
Definition:
OSDMenuInit.c:4
MyOSDRgn
word MyOSDRgn
Definition:
OSDMenuInit.c:4
ColorPickerDefaultColor
dword ColorPickerDefaultColor
Definition:
OSDMenuInit.c:29
CCS_Green
@ CCS_Green
Definition:
FBLib_TMSOSDMenu.h:121
CCS_Red
@ CCS_Red
Definition:
FBLib_TMSOSDMenu.h:120
CCS_Blue
@ CCS_Blue
Definition:
FBLib_TMSOSDMenu.h:122
InfoBoxSaveAreaY
dword InfoBoxSaveAreaY
Definition:
FBLib_TMSOSDMenu.h:234
ColorPickerColor
dword ColorPickerColor
Definition:
OSDMenuInit.c:28
FIS_vOsdMap
dword FIS_vOsdMap(void)
Definition:
FIS_vOSDMap.c:3
OSDMenuColorPickerShow
void OSDMenuColorPickerShow(const char *Title, dword Color)
Definition:
OSDMenuColorPickerShow.c:4
TRACEEXIT
#define TRACEEXIT()
Definition:
libFireBird.h:1244
TRACEENTER
#define TRACEENTER()
Definition:
libFireBird.h:1243
tOSDMapInfo
Definition:
libFireBird.h:275
TMSOSDMenu
OSDMenuColorPickerShow.c
Generated on Fri Apr 29 2022 13:34:01 for FireBirdLib - Topfield TMS PVR TAP Programming Library by
1.9.3