📄 osdpub903.c
字号:
OSDLine(2,0,24,0x40,0x90);
Gotoxy((29- Len)/2,2,0x50);
Textout_Lng(sVOLUME);
OSDPosition(372,324,50,50,0x01);
COsdFxEnableOsd();
DIALOG_SLIDER(stOsdUserData.Volume,100);
}
//----------------------------------------------------------------------------------------------------
#else
void Bright_Dialog_Draw()
{
unsigned char Len = StrLen((unsigned char code *)sDilogBright[GET_LANGUAGE]);
Init_LRDialog();
OSDLine(2,0,24,0x40,0x90);
Gotoxy((29- Len)/2,2,0x50);
Textout_Lng(sDilogBright);
OSDPosition(372,324,50,50,0x01);
COsdFxEnableOsd();
DIALOG_SLIDER(BRIGHTNESS_GUAGE,100);
}
#endif
//----------------------------------------------------------------------------------------------------
void Auto_Draw()
{
unsigned char Len = StrLen((unsigned char code *)sAuto_Adjustment[GET_LANGUAGE]);
LoadLanguageFont1();
InitDialog();
OSDLine(2,0,24,0xc0,0x90);
Gotoxy((28 - Len)/2,2,0x50);
Textout_Lng(sAuto_Adjustment);
OSDPosition(372,324,50,50,0x01);
COsdFxEnableOsd();
}
void Auto_Draw1() //this is in menu'auto
{
CLEAR_CLIENT;
Adj_Page_Title(sAuto1_Adjustment);
COsdFxEnableOsd();
}
//----------------------------------------------------------------------------------------------------
void Show_MenuItem_State(unsigned char Min,unsigned char Max,unsigned char ucState)
{
if(ucState) MENUITEM_STATE_ONSELECT((Max-Min) * 2 + 3);
else MENUITEM_STATE_NOMAL((Max-Min) * 2 + 3);
}
//------------------------------------------------------------
void ShowMode(void)
{
CLEAR_CLIENT;
//display display size
Gotoxy(9,7,0x50);
OutputDisplaySize();
//display refresh
Gotoxy(21,7,0x50);
OutputRefrushRate();
switch(stSystemData.InputSource)
{
case _SOURCE_VGA:
CenterTextout((unsigned char code*)sVGA1[GET_LANGUAGE],17,5);
break;
case _SOURCE_DVI:
CenterTextout((unsigned char code*)sDVI1[GET_LANGUAGE],17,5);
break;
}
}
//---------------------------------------------------------------------------------------------------------------------
void OSDSlider(unsigned char row, unsigned char col, unsigned char length, unsigned char value, unsigned char range,
unsigned char color)
{
unsigned int bound = 10;
unsigned char ucTmp;
//bound = value * length * 10 / range
bound *= value;
bound *= (length - 2);
bound /= range;
//Draw Frame
OSD_Rect3(col,row,length);
//Draw Slider
OSDLine(row,col + 1,length - 2,color,0x90);
//OSD_Line(row,col + 1,length - 2,0x00,0x50);
ucTmp = bound / 10;
Gotoxy(col + 1,row,0x50);
while(ucTmp)
{
OutputChar(0x29);
ucTmp--;
}
ucTmp = bound % 10;
if(ucTmp != 0)
{
OutputChar(0x20 + ucTmp);
ucTmp = length - 2 - (bound / 10) - 1;
}
else
{
ucTmp = length - 2 - (bound / 10);
}
while(ucTmp)
{
OutputChar(0);
ucTmp--;
}
//Draw Number
OSDLine(row,col + length + 1,3,0xc0,0x90);
//OSD_Line(row,col + length + 1,3,color,0x90);
Gotoxy(col + length + 1,row,0x50);
PrintfDec(value);
}
//---------------------------------------------------------------------------
/*
void OSDSlider1(unsigned char row, unsigned char col, unsigned char length, unsigned char value, unsigned char range,
unsigned char color)
{
unsigned int bound = 10;
unsigned char ucTmp;
bound *= value;
bound *= (length - 2);
bound /= range;
//Draw Frame
OSD_Rect3(col,row,length);
//Draw Slider
OSDLine(row,col + 1,length - 2,color,0x90);
//OSD_Line(row,col + 1,length - 2,0x00,0x50);
ucTmp = bound / 10;
Gotoxy(col + 1,row,0x50);
while(ucTmp)
{
OutputChar(0x29);
ucTmp--;
}
ucTmp = bound % 10;
if(ucTmp != 0)
{
OutputChar(0x20 + ucTmp);
ucTmp = length - 2 - (bound / 10) - 1;
}
else
{
ucTmp = length - 2 - (bound / 10);
}
while(ucTmp)
{
OutputChar(0);
ucTmp--;
}
//Draw Number
OSDLine(row,col + length + 1,5,0xc0,0x90);
Gotoxy(col + length,row,0x50);
PrintfInt(1628 + value);
}
//---------------------------------------------------------------------------
*/
void DrawItemSelect(unsigned char State) // State 0 : Not Select 1 : Select 2 : Enter Item
{
unsigned char ucColor;
if(State == 0) ucColor = 0x9f;
else if(State == 1) ucColor = 0xdf;
else ucColor = 0xcf;
OSDClear((ucOsdState - 1)*2+1,2, 0, 5, ucColor, THE_BYTE2);
}
//---------------------------------------------------------------------------
void DrawMenuItem1(unsigned int code *Text,unsigned char y)
{
OSD_Rect1(6,y,22);
Gotoxy(8,y,0x50);
Textout_Lng(Text);
Gotoxy(27,y,0x50);
OutputChar(0x3e);
}
//---------------------------------------------------------------------------
void DrawMenuItem2(unsigned int code *Text,unsigned char y)
{
OSD_Rect2(6,y,22);
Gotoxy(8,y,0x50);
Textout_Lng(Text);
Gotoxy(27,y,0x50);
OutputChar(0x3e);
}
//---------------------------------------------------------------------------
void OSD_Rect1(unsigned char x,unsigned char y,unsigned char Len)
{
/** output
┍────────────┐
*/
UNDERLINE(x + 1,y - 1,Len - 1,0x40); // top line color : blank
Gotoxy(x,y,0x90);
OutputChar(0x40);
Gotoxy(x,y,0x50); // out |
OutputChar(0x11);
Gotoxy(x + Len,y,0x90);
OutputChar(0x40);
Gotoxy(x + Len,y,0x50); // out |
OutputChar(0x10);
}
//---------------------------------------------------------------------------
void OSD_Rect2(unsigned char x,unsigned char y,unsigned char Len)
{
/* output
────────────
┍────────────┐
*/
DOUBLELINE(x + 1,y - 1,Len - 1,0x40); // top line color : blank
//TOPLINE(x + 1,y + 1,Len - 2,0x40); // bottom line color : blank
Gotoxy(x,y,0x90);
OutputChar(0x40);
Gotoxy(x,y,0x50); // out |
OutputChar(0x11);
Gotoxy(x + Len,y,0x90);
OutputChar(0x40);
Gotoxy(x + Len,y,0x50); // out |
OutputChar(0x10);
}
//---------------------------------------------------------------------------
void OSD_Rect3(unsigned char x,unsigned char y,unsigned char Len)
{
/** output
┍────────────┒
┕────────────┙
*/
UNDERLINE(x,y - 1,Len,0x40); // top line color : blank
TOPLINE( x,y + 1,Len,0x40); // top line color : blank
Gotoxy(x,y,0x90);
OutputChar(0x40);
Gotoxy(x,y,0x50);
OutputChar(0x10);
Gotoxy(x + Len - 1,y,0x90);
OutputChar(0x40);
Gotoxy(x + Len - 1,y,0x50);
OutputChar(0x11);
}
//---------------------------------------------------------------------------
void Adj_Page_Title(unsigned int code *Text)
{
Gotoxy(8,2,0x50);
Textout_Lng(Text);
TOPLINE(8,3,18,0x40);
}
//---------------------------------------------------------------------------
void Show_Tip1() // ?Move ??Enter ??Exit
{
OSDLine(14, 0, 30, 0, 0x50); //Clear Tip
Gotoxy(1,14,0x50);
Textout_Lng(sMove);
Gotoxy(10,14,0x50);
Textout_Lng(sEnter);
Gotoxy(20,14,0x50);
Textout_Lng(sExit);
}
//----------------------------------------------------------------------------
void Show_Tip2() // ?Move ??Enter ??Return
{
OSDLine(14, 0, 30, 0, 0x50); //Clear Tip
Gotoxy(1,14,0x50);
Textout_Lng(sMove);
Gotoxy(10,14,0x50);
Textout_Lng(sEnter);
Gotoxy(20,14,0x50);
Textout_Lng(sReturn);
}
//----------------------------------------------------------------------------
void Show_Tip3() // ?Move ??Exit
{
OSDLine(14, 0, 30, 0, 0x50); //Clear Tip
Gotoxy(1,14,0x50);
Textout_Lng(sMove);
Gotoxy(20,14,0x50);
Textout_Lng(sExit);
}
//----------------------------------------------------------------------------
void Show_Tip4() // ?Adjust ??Return
{
OSDLine(14, 0, 30, 0, 0x50); //Clear Tip
Gotoxy(1,14,0x50);
Textout_Lng(sAdjust);
Gotoxy(20,14,0x50);
Textout_Lng(sReturn);
}
//----------------------------------------------------------------------------
void Show_Title()
{
OSDLine(0, 0, 30, 0, 0x50); //Clear Title
Gotoxy(1,0,0x50);
switch(ucOsdState)
{
case _MENU_PICTURE: Textout_Lng(sPicture); break;
case _MENU_COLOR: Textout_Lng(sColor); break;
case _MENU_IMAGE: Textout_Lng(sImage); break;
case _MENU_OSD: Textout_Lng(sOSD); break;
case _MENU_SETUP: Textout_Lng(sSetup); break;
case _MENU_INFOR: Textout_Lng(sInformation); break;
}
}
//---------------------------------------------------------------------------
void SB_Selected(unsigned char x,unsigned char y,unsigned char len)
{
Gotoxy(x + 1,y,0x50);
OutputChar(0x3f); //display v
Gotoxy(x + 1,y,0x90);
OutputChar(0x2d);
OSDLine(y, x + 2, len - 2,0x4e, 0x90);
}
//---------------------------------------------------------------------------
void SB_Normal(unsigned char x,unsigned char y,unsigned char len)
{
Gotoxy(x + 1,y,0x50);
OutputChar(0x00); //display v
Gotoxy(x + 1,y,0x90);
OutputChar(0x2a);
OSDLine(y, x + 2, len - 2,0x46, 0x90);
}
//---------------------------------------------------------------------------
void SelectBar1(unsigned int code *Text,unsigned char x,unsigned char y,unsigned char len,unsigned char state)
{
OSD_Rect1(x,y,len);
Gotoxy(x + 3,y,0x50);
Textout_Lng(Text);
if(state) SB_Selected(x,y,len);
else SB_Normal(x,y,len);
}
//---------------------------------------------------------------------------
void SelectBar2(unsigned int code *Text,unsigned char x,unsigned char y,unsigned char len,unsigned char state)
{
OSD_Rect2(x,y,len);
Gotoxy(x + 3,y,0x50);
Textout_Lng(Text);
if(state) SB_Selected(x,y,len);
else SB_Normal(x,y,len);
}
//---------------------------------------------------------------------------
void Bar1(unsigned int code *Text,unsigned char x,unsigned char y,unsigned char len,unsigned char state)
{
Bar3(Text,x,y,len,state);
Gotoxy(x + len - 1,y,0x50);
OutputChar(0x3e);
}
//---------------------------------------------------------------------------
void Bar2(unsigned int code *Text,unsigned char x,unsigned char y,unsigned char len,unsigned char state)
{
Bar4(Text,x,y,len,state);
Gotoxy(x + len - 1,y,0x50);
OutputChar(0x3e);
}
//---------------------------------------------------------------------------
void Bar3(unsigned int code *Text,unsigned char x,unsigned char y,unsigned char len,unsigned char state)
{
OSD_Rect1(x,y,len);
Gotoxy(x + 2,y,0x50);
Textout_Lng(Text);
if(state) Bar_Select(x,y,len);
else Bar_Normal(x,y,len);
}
//---------------------------------------------------------------------------
void Bar4(unsigned int code *Text,unsigned char x,unsigned char y,unsigned char len,unsigned char state)
{
OSD_Rect2(x,y,len);
Gotoxy(x + 2,y,0x50);
Textout_Lng(Text);
if(state) Bar_Select(x,y,len);
else Bar_Normal(x,y,len);
}
//---------------------------------------------------------------------------
void AutoSlider(unsigned char Value)
{
if(ucOsdState < FAC_AUTO_COLOR)
{
if(((ucOsdState >= _MAGIC_CUSTOM) && (ucOsdState <= _MAGIC_THEATER)) ||
(ucOsdState == _DIALOG_BRIGHT) ||
(ucOsdState == _MENU_NONE))
{
DIALOG_SLIDER(Value,100);
}
else
{
NATAK_SLIDER(Value,100);
}
}
}
//---------------------------------------------------------------------------
void CFirstInitOsd()
{
SetOSDDouble(OSD_ALL_BLENDING);
SetAlpha();
}
//---------------------------------------------------------------------------
void SetAlpha()
{
if(GET_TRANS() == _TRANS_ON)
{
CScalerSetBit(_OVERLAY_CTRL_6C, 0xE3, (3 << 2));
}
else
{
CScalerSetBit(_OVERLAY_CTRL_6C, 0xE3, 0);
}
}
//---------------------------------------------------------------------------
void NotUseFunc()
{
//SetOSDRamAddress(0,0,0);
COsdFxCloseWindow(0);
//DirectWOSDRam(0,0,0,0);
//OSDSlider1(0,0,0,0,0,0);
//BurnInRun();
//SetRowCmds(0,0);
//Gotoxy(0,0,0);
//OutputChar(0);
//Textout(0);
//PrintfDec(0);
PrintfHex(0);
//OSDPosition(0,0,0,0,0);
//OSDLine(0,0,0,0,0);
//OSDClear(0,0,0, 0,0,0);
//OutputDisplaySize(); //在当前的位置输出显示尺寸
//OutputRefrushRate(); //在当前的位置输出刷新频率
OutputHSync(); //在当前的位置输出HSync
//COsdFxCodeWrite(0);
//COsdFxDisableOsd();
//COsdFxDrawWindow(0,0,0,0,0);
//COsdFxChangeWindowColor(0,0);
//OutputDisplaySize();
//OutputRefrushRate();
//OutputHSync();
//StrLen(0);
//ValueInRangeChange(0,0,0,0,0);
SetRTDPWM(0,0);
//CAutoDoAutoConfig();
//CAutoDoWhiteBalance();
//CEepromSaveOsdUserData();
//CEepromSaveBriConData();
//CEepromSaveColorTempData();
//CScalerLoadFont(0, 0, 0, 0);
//ShowMode();
//OSDSlider(0, 0, 0, 0, 0,0);
GetLanguegeCount();
GetNextLanguage(0);
GetPrevLanguage(0);
CheckLanguage();
FirstLanguage();
LastLanguage();
PrintfInt(0);
//COsdFxEnableOsd();
//DoReset();
//VPosGuage();
//HPosGuage();
//ClockGuage();
CenterTextout(0,0,0);
RightAlignTextOut(0,0,0);
ChangeSource();
//SetOSDDouble(0);
GetCurrLanguagePos();
IndexofLanuguage(0);
}
//----------------------------------------------------------------------------------------------------
#endif //#if(OSD_TYPE == OSD903)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -