📄 mapp_uimenudraw2.c
字号:
msAPI_OSD_DrawBlock(&clrBtn1);
clrBtn1.x = ivalue+1;
clrBtn1.y = jvalue+1;
#if(PANEL_WIDTH == 480)
clrBtn1.width = 28;
clrBtn1.height = 24;
#else
clrBtn1.width = 48;
clrBtn1.height = 48;
#endif
clrBtn1.radius = 0;
clrBtn1.u8Gradient = CONSTANT_COLOR;
clrBtn1.fHighLight = FALSE;
if(TPcolor == 0)
{
clrBtn1.b_clr = 0x080808;
clrBtn1.g_clr = 0x080808;
}
else if(TPcolor == 1)
{
clrBtn1.b_clr = 0xf8f8f8;
clrBtn1.g_clr = 0xf8f8f8;
}
else if(TPcolor == 2)
{
clrBtn1.b_clr = 0xf80808;
clrBtn1.g_clr = 0xf80808;
}
else if(TPcolor == 3)
{
clrBtn1.b_clr = 0x08f808;
clrBtn1.g_clr = 0x08f808;
}
else if(TPcolor == 4)
{
clrBtn1.b_clr = 0x0808f8;
clrBtn1.g_clr = 0x0808f8;
}
else if(TPcolor == 5)
{
clrBtn1.b_clr = 0x08f8f8;
clrBtn1.g_clr = 0x08f8f8;
}
else if(TPcolor == 6)
{
clrBtn1.b_clr = 0xf808f8;
clrBtn1.g_clr = 0xf808f8;
}
else if(TPcolor == 7)
{
clrBtn1.b_clr = 0xf8f808;
clrBtn1.g_clr = 0xf8f808;
}
else
{
clrBtn1.b_clr = 0x080808;
clrBtn1.g_clr = 0x080808;
}
msAPI_OSD_DrawBlock(&clrBtn1);
}
void MApp_UiMenu_DrawBlock_TouchPanel_Size(U16 ivalue, U16 jvalue, U8 TPsize)
{
clrBtn1.x = ivalue;
clrBtn1.y = jvalue;
#if(PANEL_WIDTH == 480)
clrBtn1.width = 30;
clrBtn1.height = 26;
#else
clrBtn1.width = 50;
clrBtn1.height = 50;
#endif
clrBtn1.radius = 0;
clrBtn1.u8Gradient = CONSTANT_COLOR;
clrBtn1.fHighLight = FALSE;
clrBtn1.b_clr = 0x080808;
clrBtn1.g_clr = 0x080808;
msAPI_OSD_DrawBlock(&clrBtn1);
clrBtn1.x = ivalue+1;
clrBtn1.y = jvalue+1;
#if(PANEL_WIDTH == 480)
clrBtn1.width = 28;
clrBtn1.height = 24;
#else
clrBtn1.width = 48;
clrBtn1.height = 48;
#endif
clrBtn1.radius = 0;
clrBtn1.u8Gradient = CONSTANT_COLOR;
clrBtn1.fHighLight = FALSE;
clrBtn1.b_clr = 0xf8f8f8;
clrBtn1.g_clr = 0xf8f8f8;
msAPI_OSD_DrawBlock(&clrBtn1);
if(TPsize == 0)
{
#if(PANEL_WIDTH == 480)
clrBtn1.x = ivalue+15;
clrBtn1.y = jvalue+13;
#else
clrBtn1.x = ivalue+25;
clrBtn1.y = jvalue+25;
#endif
clrBtn1.width = 1;
clrBtn1.height = 1;
}
else if(TPsize == 1)
{
#if(PANEL_WIDTH == 480)
clrBtn1.x = ivalue+14;
clrBtn1.y = jvalue+12;
#else
clrBtn1.x = ivalue+24;
clrBtn1.y = jvalue+24;
#endif
clrBtn1.width = 2;
clrBtn1.height = 2;
}
else if(TPsize == 2)
{
#if(PANEL_WIDTH == 480)
clrBtn1.x = ivalue+14;
clrBtn1.y = jvalue+12;
#else
clrBtn1.x = ivalue+24;
clrBtn1.y = jvalue+24;
#endif
clrBtn1.width = 3;
clrBtn1.height = 3;
}
else if(TPsize == 3)
{
#if(PANEL_WIDTH == 480)
clrBtn1.x = ivalue+13;
clrBtn1.y = jvalue+11;
#else
clrBtn1.x = ivalue+23;
clrBtn1.y = jvalue+23;
#endif
clrBtn1.width = 4;
clrBtn1.height = 4;
}
else if(TPsize == 4)
{
#if(PANEL_WIDTH == 480)
clrBtn1.x = ivalue+13;
clrBtn1.y = jvalue+11;
#else
clrBtn1.x = ivalue+23;
clrBtn1.y = jvalue+23;
#endif
clrBtn1.width = 5;
clrBtn1.height = 5;
}
else if(TPsize == 5)
{
#if(PANEL_WIDTH == 480)
clrBtn1.x = ivalue+12;
clrBtn1.y = jvalue+10;
#else
clrBtn1.x = ivalue+22;
clrBtn1.y = jvalue+22;
#endif
clrBtn1.width = 6;
clrBtn1.height = 6;
}
else if(TPsize == 6)
{
#if(PANEL_WIDTH == 480)
clrBtn1.x = ivalue+12;
clrBtn1.y = jvalue+10;
#else
clrBtn1.x = ivalue+22;
clrBtn1.y = jvalue+22;
#endif
clrBtn1.width = 7;
clrBtn1.height = 7;
}
else if(TPsize == 7)
{
#if(PANEL_WIDTH == 480)
clrBtn1.x = ivalue+11;
clrBtn1.y = jvalue+9;
#else
clrBtn1.x = ivalue+21;
clrBtn1.y = jvalue+21;
#endif
clrBtn1.width = 8;
clrBtn1.height = 8;
}
else
{
#if(PANEL_WIDTH == 480)
clrBtn1.x = ivalue+15;
clrBtn1.y = jvalue+13;
#else
clrBtn1.x = ivalue+25;
clrBtn1.y = jvalue+25;
#endif
clrBtn1.width = 1;
clrBtn1.height = 1;
}
clrBtn1.radius = 0;
clrBtn1.u8Gradient = CONSTANT_COLOR;
clrBtn1.fHighLight = FALSE;
clrBtn1.b_clr = 0x080808;
clrBtn1.g_clr = 0x080808;
msAPI_OSD_DrawBlock(&clrBtn1);
}
/*
void MApp_UiMenu_DrawFrame_2(U8 u8CPIndex)
{
clrBtn1.x = g_u16GroupXPos + OSDFrameComponents_2[u8CPIndex].u16OffsetXPos;
clrBtn1.y = g_u16GroupYPos + OSDFrameComponents_2[u8CPIndex].u16OffsetYPos;
clrBtn1.width = OSDFrameComponents_2[u8CPIndex].u16Width;
clrBtn1.height = OSDFrameComponents_2[u8CPIndex].u16Height;
clrBtn1.radius = OSDFrameComponents_2[u8CPIndex].u16Radius;
clrBtn1.u8Gradient = CONSTANT_COLOR;
clrBtn1.fHighLight = FALSE;
clrBtn1.f_clr = OSDFrameComponents_2[u8CPIndex].u32FrameColor;
clrBtn1.bFrameWidth = OSDFrameComponents_2[u8CPIndex].u8LineWidth;
if (clrBtn1.radius >0)
{
msAPI_OSD_DrawRoundFrame(&clrBtn1);
}
else
{
msAPI_OSD_DrawFrame(&clrBtn1);
}
}
*/
void MApp_UiMenu_DrawBlock_2(U8 u8CPIndex)
{
U16 old_u16GroupXPos = g_u16GroupXPos;
// change the CH number display position
clrBtn1.x = g_u16GroupXPos + OSDBlockComponents_2[u8CPIndex].u16OffsetXPos;
clrBtn1.y = g_u16GroupYPos + OSDBlockComponents_2[u8CPIndex].u16OffsetYPos;
clrBtn1.width = OSDBlockComponents_2[u8CPIndex].u16Width;
clrBtn1.height = OSDBlockComponents_2[u8CPIndex].u16Height;
clrBtn1.radius = OSDBlockComponents_2[u8CPIndex].u16Radius;
clrBtn1.u8Gradient = OSDBlockComponents_2[u8CPIndex].u8Gradient;
clrBtn1.fHighLight = FALSE;
clrBtn1.b_clr = OSDBlockComponents_2[u8CPIndex].u32StartColor;
clrBtn1.g_clr = OSDBlockComponents_2[u8CPIndex].u32EndColor;
if (clrBtn1.radius >0)
{
if (clrBtn1.u8Gradient == CONSTANT_COLOR)
{
msAPI_OSD_DrawRoundBlock(&clrBtn1);
}
else
{
msAPI_OSD_DrawGradientRoundBlock(&clrBtn1);
}
}
else
{
msAPI_OSD_DrawBlock(&clrBtn1);
}
}
void MApp_UiMenu_Draw3DConvexBlock_2(U8 u8CPIndex)
{ u8CPIndex = u8CPIndex;
/*rBtn1.x = g_u16GroupXPos + OSD3DConvexBlockComponents_2[u8CPIndex].u16OffsetXPos;
clrBtn1.y = g_u16GroupYPos + OSD3DConvexBlockComponents_2[u8CPIndex].u16OffsetYPos;
clrBtn1.width = OSD3DConvexBlockComponents_2[u8CPIndex].u16Width;
clrBtn1.height = OSD3DConvexBlockComponents_2[u8CPIndex].u16Height;
clrBtn1.radius = OSD3DConvexBlockComponents_2[u8CPIndex].u16Radius;
clrBtn1.u8Gradient = OSD3DConvexBlockComponents_2[u8CPIndex].u8Gradient;
clrBtn1.fHighLight = FALSE;
clrBtn1.b_clr = OSD3DConvexBlockComponents_2[u8CPIndex].u32StartColor;
clrBtn1.g_clr = OSD3DConvexBlockComponents_2[u8CPIndex].u32EndColor;
msAPI_OSD_DrawBlock(&clrBtn1);
MApp_UiMenu_DrawBorder(&clrBtn1, 10, 7, 9, 5);*/
}
void MApp_UiMenu_Draw3DConcaveBlock_2(U8 u8CPIndex)
{ u8CPIndex = u8CPIndex;
/*lrBtn1.x = g_u16GroupXPos + OSD3DConcaveBlockComponents_2[u8CPIndex].u16OffsetXPos;
clrBtn1.y = g_u16GroupYPos + OSD3DConcaveBlockComponents_2[u8CPIndex].u16OffsetYPos;
clrBtn1.width = OSD3DConcaveBlockComponents_2[u8CPIndex].u16Width;
clrBtn1.height = OSD3DConcaveBlockComponents_2[u8CPIndex].u16Height;
clrBtn1.radius = OSD3DConcaveBlockComponents_2[u8CPIndex].u16Radius;
clrBtn1.u8Gradient = OSD3DConcaveBlockComponents_2[u8CPIndex].u8Gradient;
clrBtn1.fHighLight = FALSE;
clrBtn1.b_clr = OSD3DConcaveBlockComponents_2[u8CPIndex].u32StartColor;
clrBtn1.g_clr = OSD3DConcaveBlockComponents_2[u8CPIndex].u32EndColor;
msAPI_OSD_DrawBlock(&clrBtn1);
MApp_UiMenu_DrawBorder(&clrBtn1, 7, 10, 5, 9);*/
}
void MApp_UiMenu_DrawBitmap_2(U16 u8CPIndex, COMPONENT_STATE_TYPE State)
{
U32 u32Colorkey;
U8 r_clr, g_clr, b_clr;
U16 BMPHandleIndex;
clrBtn1.x = g_u16GroupXPos + OSDBitmapComponents_2[u8CPIndex].u16OffsetXPos;
clrBtn1.y = g_u16GroupYPos + OSDBitmapComponents_2[u8CPIndex].u16OffsetYPos;
gbmpfmt.width = OSDBitmapComponents_2[u8CPIndex].u16Width;
gbmpfmt.height = OSDBitmapComponents_2[u8CPIndex].u16Height;
gbmpfmt.bBmpColorKeyEnable = TRUE;
gbmpfmt.bScale = OSDBitmapComponents_2[u8CPIndex].bScale;
u32Colorkey = OSDBitmapComponents_2[u8CPIndex].u32Colorkey;
r_clr=((u32Colorkey&0x00ff0000)>>16)&0xff;
g_clr=((u32Colorkey&0x0000ff00)>>8)&0xff;
b_clr=((u32Colorkey&0x000000ff))&0xff;
gbmpfmt.clrrange.color_s.a = 0;
gbmpfmt.clrrange.color_s.r = r_clr;
gbmpfmt.clrrange.color_s.g = g_clr;
gbmpfmt.clrrange.color_s.b = b_clr;
gbmpfmt.clrrange.color_e.a = 0;
gbmpfmt.clrrange.color_e.r = r_clr;
gbmpfmt.clrrange.color_e.g = g_clr;
gbmpfmt.clrrange.color_e.b = b_clr;
switch (State)
{
case EN_CPSTATE_SELECT:
BMPHandleIndex=OSDBitmapComponents_2[u8CPIndex].BMPHandleIndex_Select;
break;
case EN_CPSTATE_PATH:
BMPHandleIndex=OSDBitmapComponents_2[u8CPIndex].BMPHandleIndex_Path;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -