123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221 |
- #include "gui.h"
- #include "lcdDrv.h"
- #include "lsapi_fs.h"
- #include "log.h"
- #include "fonts.h"
- #include "board.h"
- #include "uiEntry.h"
- #include "app.h"
- #define COLOR_BACKGROUND COLOR_WHITE
- #define COLOR_FOREGROUND COLOR_BLUE
- unsigned char g_aucLcdBufF[GLCD_HEIGHT/8][GLCD_WIDTH];
- unsigned int g_backColor;
- unsigned int g_foreColor;
- unsigned int guiGetBackColor(void){return g_backColor;}
- unsigned int guiGetForeColor(void){return g_foreColor;}
- void LcdSetAddr(unsigned char x, unsigned char Page)
- {
- LCD_CtrlWrite_ST7735(0xB0+Page);
- LCD_CtrlWrite_ST7735(0x10+((x>>4)&0x0f));
- LCD_CtrlWrite_ST7735(x&0x0f);
- }
- void LCDFlashPain(void){
- unsigned char i,j;
- for(i=0;i<GLCD_HEIGHT/8;i++){
- for(j=0;j<GLCD_WIDTH;j++){
- LcdSetAddr(j,i);//coum,page
- LCD_DataWrite_ST7735(g_aucLcdBufF[i][j]);
- }
- }
- }
- void newGuiClearBar(void){
- newGuiClearPage(0, ROW_ONE);
- DrawLineV(0,8,GLCD_WIDTH);
- }
- void newGuiClearPage(unsigned char x,ROW_ENUM row){
- int i,j;
- if(row>ROW_FOUR) return;
- j=2*row;
- for(i=x;i<GLCD_WIDTH;i++){
- g_aucLcdBufF[j][i]=0;
- g_aucLcdBufF[j+1][i]=0;
- }
- }
- void newGuiClearMainPage(void){
- newGuiClearPage(0, ROW_TWO);
- newGuiClearPage(0, ROW_THREE);
- newGuiClearPage(0, ROW_FOUR);
- }
- void LCDFlashPainPage(unsigned char x ,unsigned char y){
- unsigned char i,j;
- for(i=y/8;i<GLCD_HEIGHT/8;i++){
- for(j=x;j<GLCD_WIDTH;j++){
- LcdSetAddr(j,i);//coum,page
- LCD_DataWrite_ST7735(g_aucLcdBufF[i][j]);
- }
- }
- }
- void LcdStatusBarFlash(void){
- unsigned char i,j;
- for(i=0;i<2;i++){
- for(j=0;j<GLCD_WIDTH;j++){
- LcdSetAddr(j,i);//coum,page
- LCD_DataWrite_ST7735(g_aucLcdBufF[i][j]);
- }
- }
- }
- static unsigned short RGB888_2_RGB565(unsigned int rgb888){
- unsigned short r,g,b,rgb565;
-
- b=(rgb888 >> (16+3))&0x1F;
- g=(rgb888 >> (8+2))&0x3f;
- r=(rgb888 >> (0+3))&0x1f;
-
- rgb565=((r<<11) + (g<<5) + (b<<0));
- return rgb565;
- }
- static void guiDrawDot(unsigned short colorData){
- LCD_DataWrite_ST7735(colorData >> 8);
- LCD_DataWrite_ST7735(colorData & 0xff);
- }
- static void guiBlockSet(unsigned short sx, unsigned short ex, unsigned short sy, unsigned short ey){
- LCD_CtrlWrite_ST7735(0x2a);
- guiDrawDot(sx);
- guiDrawDot(sy);
-
- LCD_CtrlWrite_ST7735(0x2B);
- guiDrawDot(ex);
- guiDrawDot(ey);
- LCD_CtrlWrite_ST7735(0x2C);
- }
- #define KEEP_HZK_OPENED //ê?·?±£3????t3£?a
- static int guiGetHzk(unsigned char hiByte, unsigned char loByte, unsigned char *pHzk, FONT_MODEENUM fontMode){
- unsigned char Q,W;
- unsigned int offset;
- const char hzk_12x12[]="HZK12";
- const char hzk_16x16[]="HZK16";
- char *hzk_ptr=NULL;
- static int fd_12=NULL,fd_16=NULL;
- int *fd_ptr=NULL;
- int fsize;
- if(hiByte<0xa0 || loByte<0xa0) return -1;
- Q=hiByte-0xa0;
- W=loByte-0xa0;
- if(FONT_MODE_12X12==fontMode){
- fsize = 24;
- hzk_ptr=(char *)hzk_12x12;
- fd_ptr=&fd_12;
- }else if(FONT_MODE_16X16==fontMode){
- fsize = 32;
- hzk_ptr=(char *)hzk_16x16;
- fd_ptr=&fd_16;
- }else return -2;
- offset=(94 * (Q-1) + (W-1))* fsize;
- //′ò?a???t
- if(*fd_ptr==NULL){
- int fd=LSAPI_FS_Open(hzk_ptr, LSAPI_FS_O_RDONLY, 0);
- if(fd==NULL){
- MSG_ERR(1, "%s open failed", hzk_ptr);
- return -3;
- }
- *fd_ptr=fd;
- }
- //?áè??úèY
- LSAPI_FS_Seek(*fd_ptr, offset, LSAPI_FS_SEEK_SET);
- offset=LSAPI_FS_Read(*fd_ptr, pHzk,fsize);
- #ifndef KEEP_HZK_OPENED
- LSAPI_FS_Close(*fd_ptr);
- *fd_ptr=NULL;
- #endif
- return offset;
- }
- static int fd_12_ext=NULL,fd_16_ext=NULL;
- static int extFileSize_1212=-1;
- static int extFileSize_1616=-1;
- bool fontExtLock=false;
- void extFontFileCtl(unsigned char fontType,bool ctl){
- int *fd_ext;
- if(ctl==true) fontExtLock=false;
- else{
- fontExtLock=true;
- if(fontType==12) fd_ext=&fd_12_ext;
- else if(fontType==16) fd_ext=&fd_16_ext;
- else{
- fontExtLock=false;
- return;
- }
- if(*fd_ext != NULL){
- LSAPI_FS_Close(*fd_ext);
- *fd_ext=NULL;
- }
- }
- }
- static int guiGetExtHzk(unsigned char hiByte, unsigned char loByte, unsigned char *pHzk, FONT_MODEENUM fontMode){
- unsigned char Q,W;
- int offset,i;
- char *hzk_ptr=NULL;
- int *fd_ptr=NULL;
- int *fsize,rsize;
- LSAPI_FS_Stat_info_t pBuf;
- unsigned char tmp[2+32];
- if(fontExtLock==true) return -1;
- if(FONT_MODE_12X12==fontMode){
- rsize = 24+2;
- hzk_ptr=HZK_12_NEW_FILE;
- fd_ptr=&fd_12_ext;
- fsize=&extFileSize_1212;
- }else if(FONT_MODE_16X16==fontMode){
- rsize = 32+2;
- hzk_ptr=HZK_16_NEW_FILE;
- fd_ptr=&fd_16_ext;
- fsize=&extFileSize_1616;
- }else return -2;
- //′ò?a???t
- if(*fd_ptr==NULL){
- int fd=LSAPI_FS_Open(hzk_ptr, LSAPI_FS_O_RDONLY, 0);
- if(fd==NULL){
- MSG_ERR(1, "%s open failed", hzk_ptr);
- return -3;
- }
- *fd_ptr=fd;
- }
- //get file size
- if(*fsize<1){
- memset(&pBuf,0,sizeof(pBuf));
- LSAPI_FS_Fstat(*fd_ptr,&pBuf);
- *fsize=pBuf.st_size;
- if(*fsize<0){
- offset=-4;
- goto F_END;
- }
- }
- LSAPI_FS_Seek(*fd_ptr, 0, LSAPI_FS_SEEK_SET);
- //check size
- if(1!=LSAPI_FS_Read(*fd_ptr, tmp,1)){
- offset=-5;
- goto F_END;
- }
- if(FONT_MODE_12X12==fontMode && tmp[0]!=12){
- offset=-6;
- goto F_END;
- }else if(FONT_MODE_16X16==fontMode && tmp[0]!=16){
- offset=-7;
- goto F_END;
- }
- for(;;){
- offset=LSAPI_FS_Read(*fd_ptr, tmp,rsize);
- if(offset != rsize){
- offset=-8;
- goto F_END;
- }
- if(tmp[0]==hiByte && tmp[1]==loByte){
- offset=rsize-2;
- memcpy(pHzk, tmp+2, offset);
- goto F_END;
- }
- }
- offset=-9;
- F_END:
- #ifndef KEEP_HZK_OPENED
- LSAPI_FS_Close(*fd_ptr);
- *fd_ptr=NULL;
- #endif
- return offset;
- }
- static void guiShowChars(unsigned short x,unsigned short y,unsigned char hiByte, unsigned char loByte,
- FONT_MODEENUM fontMode,
- unsigned int frontColorID,//????
- unsigned int backColorID,//????
- REV_ENUM rev){//??
- unsigned short i,j,k,m,n,fcolor,bcolor;
- unsigned short width,height;
- unsigned char ByteWidth,data;
- const unsigned char *l_pucFont,*l_pucLetter;
- unsigned char *p;
- unsigned char sucHzk16[32];
- unsigned char sucHzk12[24];
- int ret;
- //===?¨¨?¨′?Y?á??¤?¨|¨¨????¨o?|ì??¨a??é????é|ì??¨?¨oy?Y????|쨨===
- x++;y++;
- k = 0;
- if(hiByte==0){//english
- if(fontMode==FONT_MODE_12X12){//8* 12
- width=8;//8
- height = 12; //12
- ByteWidth = 1;
- l_pucFont = g_apucFonts12;
- l_pucLetter = g_apucLetter12;
- }else{ //8*16
- width=8;
- height = 16;
- ByteWidth = 1;
- l_pucFont = g_apucFonts16;
- l_pucLetter = g_apucLetter16;
- }
- while(*l_pucLetter){
- if(loByte == *l_pucLetter)break;
- l_pucLetter ++;
- k ++;
- }
- //2¨|?¨°|ì??á??a|ì??a¨o?????
- l_pucFont += k * ByteWidth * height;
- }else{//chinese
- if(fontMode==FONT_MODE_12X12){//12*16
- width=16;
- height = 12;
- ByteWidth = 2;
- l_pucFont = sucHzk12;
- l_pucLetter = 0;
- k=0;
- ret=guiGetHzk(hiByte,loByte,sucHzk12,fontMode);
- if(sizeof(sucHzk12)!=ret) ret=guiGetExtHzk(hiByte, loByte, sucHzk12,fontMode);
- if(sizeof(sucHzk12)!=ret){//??¨?sFlash|ì?HZK???t?D?¨¢¨¨??á??a¨oy?Y
- //?¨°2?|ì??á??a?ê???¨o?"?¨2"
- l_pucFont=g_apucCLetter16;
- MSG_ERR(1, "guiGetHzk12Err:%02x,%02x,%d",hiByte,loByte,ret);
- }
- }else{//16*16
- width=16;
- height = 16;
- ByteWidth = 2;
- l_pucFont = sucHzk16;
- l_pucLetter = 0;
- k=0;
- ret=guiGetHzk(hiByte,loByte,sucHzk16,fontMode);
- if(sizeof(sucHzk16)!=ret) ret=guiGetExtHzk(hiByte, loByte, sucHzk16,fontMode);
- if(sizeof(sucHzk16)!=ret){//??¨?sFlash|ì?HZK16???t?D?¨¢¨¨??á??a¨oy?Y
- //?¨°2?|ì??á??a?ê???¨o?"?¨2"
- l_pucFont=g_apucCLetter16;
- MSG_ERR(1, "guiGetHzk16Err:%02x,%02x,%d",hiByte,loByte,ret);
- }
- }
- }
- //====================?¨′??|¨¤¨a|ì??¨?¨oy?Y==========
- if(y+height>GLCD_HEIGHT)return;
- if(x+width>GLCD_WIDTH)return;
- guiBlockSet(x,y,x+width-1,y+height-1);//8,12
- fcolor=RGB888_2_RGB565(frontColorID);
- bcolor=RGB888_2_RGB565(backColorID);
- //¨°?????à?¨???|ì??¨???é|ì?LCD?ê?2?¨?????????ê¨??¨?¨22a¨o??ê??á?騰a|ì??¨??2?¨°a|ì??¨??PaintBufToLcd?ê??¤??¨°¨°2??é?¨¢¨¢?
- //?¨′?Y?á???ê?¨2??????D?-|ì?
- for(j=0;j<height;j++){
- m=y+j;
- for(i=0;i<ByteWidth;i++){
- n=x+i*8;
- data=*l_pucFont++;
- for(k=0;k<8;k++){
- if(data & (0x80>>k)){//??,??frontColorID
- if(REVERSED_NO==rev) guiDrawDot(fcolor);
- else guiDrawDot(bcolor);
- }else{//??,??backColorID
- if(REVERSED_NO==rev) guiDrawDot(bcolor);
- else guiDrawDot(fcolor);
- }
- }
- }
- }
- }
- short guiGetStrXLen(char *str, FONT_MODEENUM fontMode){
- unsigned char ch;
- unsigned short len=0;
- unsigned char bsize;
-
- if(FONT_MODE_12X12==fontMode) bsize=6;
- else if(FONT_MODE_16X16==fontMode) bsize=8;
- else return 0;
- while ((ch=*str++)){
- if(ch=='M')len+=12;
- else if(ch>='A'&&ch<='Z')len+=8;
- else if(ch>='a'&&ch<='z')len+=8;
- else if(ch>='0'&&ch<='9')len+=8;
- else if(ch>=0x20&& ch<=0x60)len+=8; //¨??¨oa?á??¤?
- else len+=bsize;
- }
- return len;
- }
- //ò????ó?ú??ía?a·?
- void guiShowStr(unsigned short x, unsigned short y,const char *string, FONT_MODEENUM fontMode,
- REV_ENUM rev, //????
- unsigned int frontColorID,//???
- unsigned int backColorID){//???
- unsigned char width1,width2,heigh;
- unsigned char *p;
- unsigned short i;
-
- if(fontMode == FONT_MODE_12X12){
- width1 = 12;
- width2 = 1;
- heigh=12;
- }else if(fontMode == FONT_MODE_16X16){
- width1 = 16;
- width2 = 1;
- heigh=16;
- }else return;
- p = (unsigned char *)string;
- i = 0;
-
- while(*p){
- if (*p > 0x80){//chinese letter
- guiShowChars(x+i,y,*p, *(p+1),fontMode,frontColorID,backColorID,rev);
- i += width1 ;
- p += 2;
- }else{//english letter
- guiShowChars(x + i,y,0,*p,fontMode,frontColorID,backColorID,rev);
- if(fontMode==0) i += width2 * 8;
- else i += width2 * 8;
- p ++;
- }
- }
- }
- void guiShowButton(unsigned short x, unsigned short y,const char *str, FONT_MODEENUM fontMode,unsigned int buttonColorID, unsigned int strColorID){
- int heigh,len;
-
- if(FONT_MODE_12X12==fontMode) heigh=12+4;
- else if(FONT_MODE_16X16==fontMode) heigh=16+4;
- else return;
- len=guiGetStrXLen((char *)str, fontMode);
- guiFillRect(x,y,x+len+8,y+heigh,buttonColorID);
- guiShowStr(x+4, y+1, str, fontMode,REVERSED_NO,strColorID,buttonColorID);
- }
- void guiFillRect(unsigned short x1, unsigned short y1, unsigned short x2, unsigned short y2,unsigned int colorData){
- x1++;x2++;y1++;y2++;
- unsigned short x=x2,y=y2,w,h,i,m,k,j,data;
- if(x1>x2 || y1>y2) return;
- if(x1>=GLCD_WIDTH || y1>=GLCD_HEIGHT) return;
- if(x>GLCD_WIDTH) x=GLCD_WIDTH;
- if(y>GLCD_HEIGHT) y=GLCD_HEIGHT;
- w=x-x1+1;
- h=y-y1+1;
- data=RGB888_2_RGB565(colorData);
- guiBlockSet(x1,y1,x,y);
- for(i=0;i<h;i++){
- m=y1+i;
- for(j=0;j<w;j++){
- k=x1+j;
- guiDrawDot(data);
- }
- }
- }
- void guiClearRect(unsigned short x1, unsigned short y1, unsigned short x2, unsigned short y2, unsigned int colorData){
- guiFillRect(x1,y1,x2,y2,colorData);
- }
- //??????
- void guiDrawHLine(unsigned short x1, unsigned short x2, unsigned short y, unsigned short ysize, unsigned int colorID){
- if(ysize==0) return;
- if(x2<x1) return;
- guiFillRect(x1,y,x2,y+ysize-1,colorID);
- }
- //′1?±??
- void guiDrawVLine(unsigned short y1, unsigned short y2, unsigned short x, unsigned short xsize, unsigned int colorID){
- if(xsize==0) return;
- if(y2<y1) return;
- guiFillRect(x,y1,x+xsize-1,y2,colorID);
- }
- void guiDrawRect(unsigned short x1, unsigned short y1, unsigned short x2, unsigned short y2,unsigned char width, unsigned int colorID){
- if(x1>x2||y1>y2) return;
- guiDrawHLine(x1,x2,y1,width,colorID);
- guiDrawHLine(x1,x2,y2,width,colorID);
- guiDrawVLine(y1,y2,x1,width,colorID);
- guiDrawVLine(y1,y2+width-1,x2,width,colorID);
- }
- //óé·??ò?aμ?(x,y)?aê??-
- void guiDrawArrow(unsigned short x, unsigned short y,unsigned short len, ARROW_ENUM direction, unsigned int colorID){
- unsigned short i;
- switch(direction){
- case ARROW_LEFT:
- for(i=0;i<len;i++) guiDrawRect(x+i,y-i,x+i,y+i,1,colorID);
- break;
- case ARROW_RIGHT:
- for(i=0;i<len;i++) guiDrawRect(x-i,y-i,x-i,y+i,1,colorID);
- break;
- case ARROW_UP:
- for(i=0;i<len;i++) guiDrawRect(x-i,y+i,x+i,y+i,1,colorID);
- break;
- case ARROW_DOWN:
- for(i=0;i<len;i++) guiDrawRect(x-i,y-i,x+i,y-i,1,colorID);
- break;
- }
- }
- static void guiFillBmpBuf(unsigned short x, unsigned short y, unsigned short width, unsigned short height, unsigned char *bmpBuf){
- int i,j,k,t;
- unsigned short RGB565,r,g,b;
- unsigned char R,G,B;
- for(j=0;j<height;j++){
- t=y+j;
- k=j*width;
- for(i=0;i<width;i++){
- R=bmpBuf[3*i];
- G=bmpBuf[3*i+1];
- B=bmpBuf[3*i+2];
- r=R>>3;
- g=G>>2;
- b=B>>3;
- RGB565=((r<<11)+(g<<5)+(b<<0));
- guiDrawDot(RGB565);
- }
- }
- }
- int WidthBytes( int nBits, int nWidth ){
- int nWidthBytes;
- nWidthBytes = nWidth;
- if( nBits == 1 ) nWidthBytes = ( nWidth + 7 ) / 8;
- else if( nBits == 4 ) nWidthBytes = ( nWidth + 1 ) / 2;
- else if( nBits == 16 ) nWidthBytes = nWidth * 2;
- else if( nBits == 24 ) nWidthBytes = nWidth * 3;
- else if( nBits == 32 ) nWidthBytes = nWidth * 4;
-
- while( ( nWidthBytes & 3 ) != 0 ) nWidthBytes++;
-
- return( nWidthBytes );
- }
- void guiShowBmp(unsigned short x, unsigned short y, char *bmp){
- }
- #define IMAGE_MAX_SIZE 322
- void guiShowBinMap(unsigned short x, unsigned short y, char *bmp){
- int fd,filelen;
- unsigned char temp[IMAGE_MAX_SIZE],round;
- LSAPI_FS_Stat_info_t pBuf;
- unsigned short w,h,i,j,page,l,totalPage,leftbits,k,n,d,f,startY,moveBits,totalHDots,index1,index2;
-
- fd=LSAPI_FS_Open(bmp, LSAPI_FS_O_RDONLY,0);
- if(fd<0){
- MSG_ERR(1, "%s open failed", bmp);
- return;
- }
- //check file length
- memset(&pBuf,0,sizeof(pBuf));
- LSAPI_FS_Fstat(fd,&pBuf);
- filelen=pBuf.st_size;
- if(filelen>IMAGE_MAX_SIZE){
- MSG_INFO(1, "%s image too large %d>%d",bmp,filelen,IMAGE_MAX_SIZE);
- goto BMP_END;
- }
-
- LSAPI_FS_Read(fd, temp, filelen);
- w=temp[0];//width
- h=temp[1];//heigh
- page=y/8;//start page
- startY=y%8;//draw from startY dot
-
- for(i=0;i<w;i++)
- {
- totalHDots=h;//total moving row dots
- index1=0; //page++;
- index2=1;
- totalPage = h/8; //total pages
- round=0;
-
- while(totalPage)
- {
- //write the first time
- moveBits=8-startY;//pages need to be move in this page
- for(n=0;n<moveBits;n++)
- {
- if(temp[2+(index1*w)+i] & 1) g_aucLcdBufF[page+(index1)][x+i] |= (1<<(startY+n));
- else g_aucLcdBufF[page+(index1)][x+i] &= ~(1<<(startY+n));
- //move bits
- temp[2+(index1*w)+i] >>= 1;
- }
-
- totalHDots -= moveBits;
- if(totalHDots <=0) break;
-
- //write the second time
- if(moveBits==8){//é?ò?ò3ê?°′??ì?8dotD′μ?
- //′?ò3ò2°′??ò3D′
- if(totalHDots >= 8) moveBits=8;
- else moveBits=totalHDots;
-
- startY=0;
- for(n=0;n<moveBits;n++)
- {
- if(temp[2+(index2*w)+i] & 1) g_aucLcdBufF[page+index2][x+i] |= (1<<(startY+n));
- else g_aucLcdBufF[page+index2][x+i] &= ~(1<<(startY+n));
- //???ùóDBits?òμíò?ò???
- temp[2+(index2*w)+i] >>= 1;
- }
- }
- else{
- moveBits = startY; //5
- for(n=0;n<moveBits;n++)
- {
- if(temp[2+(index1*w)+i] & 1) g_aucLcdBufF[page+index2][x+i] |= (1<<(n));
- else g_aucLcdBufF[page+index2][x+i] &= ~(1<<(n));
- //???ùóDBits?òμíò?ò???
- temp[2+(index1*w)+i] >>= 1;
- }
- }
- totalHDots -= moveBits;
- if(totalHDots <=0) break;
- index1++;
- index2++;
- totalPage--;
- }
- }
- //LCDFlashPain();
- LCDFlashPainPage(x,y);
- BMP_END:
- if(fd>0) LSAPI_FS_Close(fd);
- }
- /*?ó?D??ê?*/
- void guiShowCaption(unsigned short xType, const char *str, unsigned short y, unsigned int frontColorID, unsigned int backColorID, FONT_MODEENUM fontMode){
- int len,sy;
- unsigned short x;
- len=guiGetStrXLen((char *)str,fontMode);
- if(xType==0) x=(GLCD_WIDTH-len)/2;
- else x=xType;
- guiShowStr(x, y, str, fontMode, REVERSED_NO, frontColorID, backColorID);
- }
- void guiClearArea(unsigned short x, unsigned short y, unsigned short width, unsigned short height,unsigned int colorID){
- guiFillRect(x,y,x+width,y+height,colorID);
- }
- void newGuiNoteBoot(char type){
- const char *p1="正在开机";
- const char *p2="请等待";
- const char *p3="欢迎使用";
- const char *p4="公网集群对讲机";
- char *ptr1,*ptr2;
- if(type==0){
- ptr1=p1;
- ptr2=p2;
- }else{
- ptr1=p3;
- ptr2=p4;
- }
- newGuiClearMainPage();
- DrawLineV(0, 8, GLCD_WIDTH);
- newGuiShowMessageBox(ptr1,ROW_TWO);
- newGuiShowMessageBox(ptr2,ROW_THREE);
- }
- void guiInit(void){
- memset(g_aucLcdBufF, 0x00, GLCD_HEIGHT/8*GLCD_WIDTH);
-
- // SetMessageConfi();
- //if(sutApp.account.tnet==5) guiShowBmp(0,0,"welcome5.bin");//开机图片
- //else guiShowBmp(0,0,"welcome.bin");//开机图片
- newGuiNoteBoot(0);
- LCDFlashPain();//刷屏缓存
- lcdBackLightApi(1);//清屏后打开,否则会看到关机前的画面
- }
- void guiClearAll(unsigned int colorID){//只清第二,三区
- guiFillRect(0, UI_STATUS_ITEM_Y, GLCD_WIDTH-1, UI_CONTENT_SHOW_Y-1, guiGetForeColor());//清除第二区
- guiFillRect(0,UI_CONTENT_SHOW_Y,GLCD_WIDTH-1,GLCD_HEIGHT-1,colorID);
- }
- void guiShowMessageBox(char *msg){
- char buf[70];
- short len,x,y;
- y=GLCD_HEIGHT/2;
- guiClearRect(0,y-20,GLCD_WIDTH-1,y+20,guiGetBackColor());
- guiDrawRect(2,y-18,GLCD_WIDTH-3,y+18,1,COLOR_BLACK);
- StrIntercept(buf,msg,18);
- #ifdef USE_12X12_FONT_ONLY
- len=guiGetStrXLen(buf,FONT_MODE_12X12);
- x=(GLCD_WIDTH-len)/2;
- guiShowStr(x,y-6,buf,FONT_MODE_12X12,REVERSED_NO,COLOR_BLACK,guiGetBackColor());
- #else
- len=guiGetStrXLen(buf,FONT_MODE_16X16);
- x=(GLCD_WIDTH-len)/2;
- guiShowStr(x,y-8,buf,FONT_MODE_16X16,REVERSED_NO,COLOR_BLACK,guiGetBackColor());
- #endif
- }
- //画一条线,线粗为1点
- //x,y为纵横坐标
- //len为长度
- void DrawLineV(unsigned char x, unsigned char y,unsigned char len)
- {
- //x 0 - 127
- //y 0 - 63
- unsigned char i,j,page,l,length;
-
- if(len<=1) return;
- if(x > GLCD_WIDTH) return;
- if(y > GLCD_HEIGHT) return;
- page = y/8;
- l=y%8;
- length=len;
- if(length+x > GLCD_WIDTH) length = GLCD_WIDTH-x;
- for(i=0;i<length;i++){
- // g_aucLcdBufF[page][x+i] |= (1<<l);
- g_aucLcdBufF[page][x+i] |= (1<<2);
- g_aucLcdBufF[page][x+i] |= (1<<3);//
- }
-
- // LCDFlashPain();
- LCDFlashPainPage(x,y);
- }
- //画一条线,线粗为1点
- //x,y为纵横坐标
- //height为高度
- void DrawLineH(unsigned char x, unsigned char y, unsigned char height)
- {
- //x 0 - 127
- //y 0 - 63
- unsigned char i,j,page,l,k,hei,totalPage,leftbits;
-
- if(height<=1) return;
- if(x > GLCD_WIDTH) return;
- if(y > GLCD_HEIGHT) return;
-
-
- page = y/8; //第几页
- l=y%8; //第几个
-
- totalPage = (height-(8-l))/8; //共几页
-
- if(height > (8-l))
- leftbits = (height-(8-l))%8; //尾部位置
- else
- leftbits = 0;
-
- hei=height;
-
- if(hei+x > GLCD_WIDTH) hei = GLCD_WIDTH-x; //
- if(height < 8) k = 8-height;
- else k=l;
-
- //printf("page:%d,l:%d,totalPage:%d,leftbits:%d,hei:%d,k:%d\r\n", page,l,totalPage,leftbits,hei,k);
- for(i=0;i<(8-k);i++)
- g_aucLcdBufF[page][x] |= (1<<(l+i));
- for(i=0;i<totalPage;i++)
- {
- g_aucLcdBufF[page+i+1][x] |= 0xff;
- }
- if(leftbits)
- {
- for(i=0;i<leftbits;i++)
- g_aucLcdBufF[page+totalPage+1][x] |= (1<<i);
- }
- LCDFlashPainPage(x,y);
- }
- void newGuiShowMessageBox(char *msg, ROW_ENUM row){
- int len=guiGetStrXLen(msg, FONT_MODE_16X16);
- int y;
- if(row==ROW_TWO) y=16;
- else if(row==ROW_THREE) y=32;
- newGuiShowStr((GLCD_WIDTH-len)/2, y, msg,REVERSED_NO,FONT_MODE_16X16);
- }
- /*****************************************
- 从字库文件HZK16中提取某汉子的字库数据
- 输入:hiByte--汉字的高字节 loByte--汉字的低字节
- 字库文件存储在sFlash中,字库文件名为HZK16
- 输出:pHzk--提取到的字库数据,需要预留足够空间存储。如果是16*16 则应该是16*16/8=32Byte
- 返回:失败返回0 成功返回长度
- ******************************************/
- int GetHzk(unsigned char hiByte,unsigned char loByte,unsigned char *pHzk,FONT_MODEENUM font)
- {
- int fd;
- unsigned char Q,W;
- unsigned int offset;
- const char *HZK12="HZK12";
- const char *HZK16="HZK16";
- char *hzk;
- int readlen;
-
- if(hiByte<0xa0 || loByte<0xa0)return 0;
- Q=hiByte-0xa0;
- W=loByte-0xa0;
- if(font==FONT_MODE_16X16){
- hzk=HZK16;
- readlen=32;
- }else{
- hzk=HZK12;
- readlen=24;
- }
- offset=(94 * (Q-1) + (W-1))* readlen;
- fd=LSAPI_FS_Open(hzk, LSAPI_FS_O_RDONLY,0);
-
- if(fd<0){
- MSG_ERR(1, "%s open failed", hzk);
- return 0;
- }
- LSAPI_FS_Seek(fd, offset,LSAPI_FS_SEEK_SET);
- readlen=LSAPI_FS_Read(fd, pHzk, readlen);
- LSAPI_FS_Close(fd);
- return readlen;
- }
- void Rota90Degreed12(unsigned char *source)
- {
- unsigned char temp[24];
-
- unsigned char i,j,h,k;
- memset(temp,0,24);
- //左上角部分
- for(j=0;j<8;j++)
- {
- for(i=0;i<8;i++)
- if(source[2*i] & (1<<(7-j))) temp[j] |= (1<<i);
- }
- //右上角部分
- for(j=0;j<4;j++)
- {
- for(i=0;i<8;i++)
- if(source[2*i+1] & (1<<(7-j))) temp[1*8+j] |= (1<<i);
- }
-
- //左下角部分
- for(j=0;j<8;j++)
- {
- for(i=0;i<4;i++)
- if(source[1*16+2*i] & (1<<(7-j))) temp[1*12+j] |= (1<<i);
- }
- //右下角部分
- for(j=0;j<4;j++)
- {
- for(i=0;i<4;i++)
- if(source[1*16+2*i+1] & (1<<(7-j))) temp[1*20+j] |= (1<<i);
- }
- memcpy(source, temp,24);
- }
- void Rota90Degreed16(unsigned char *source)// 旋转90度
- {
- unsigned char temp[32];
-
- unsigned char i,j,h,k;
- memset(temp,0,32);
- //左上角部分
- for(j=0;j<8;j++)
- {
- for(i=0;i<8;i++)
- if(source[2*i] & (1<<(7-j))) temp[j] |= (1<<i);
- }
- //右上角部分
- for(j=0;j<8;j++)
- {
- for(i=0;i<8;i++)
- if(source[2*i+1] & (1<<(7-j))) temp[1*8+j] |= (1<<i);
- }
-
- //左下角部分
- for(j=0;j<8;j++)
- {
- for(i=0;i<8;i++)
- if(source[1*16+2*i] & (1<<(7-j))) temp[1*16+j] |= (1<<i);
- }
- //右下角部分
- for(j=0;j<8;j++)
- {
- for(i=0;i<8;i++)
- if(source[1*16+2*i+1] & (1<<(7-j))) temp[1*24+j] |= (1<<i);
- }
- memcpy(source, temp,32);
- }
- //rev 0 正常显示 否则反显
- void newGuiShowStr(unsigned char X, unsigned char y, const char *str,unsigned char rev,FONT_MODEENUM font)
- {
- //12*12中文
- //8*12 英文
- unsigned char *p;
- unsigned char i,j;
- unsigned char charNum,tempData;
- unsigned char sucHzk12[24+2];//12*12字体间会很窄,加第13列为0,这样好看
- unsigned char tempBack[12];
- unsigned char sucHzk16[32];
- unsigned char h,k1,k2,k3,pa;
- unsigned short temp;
- int ret;
- charNum=0;
- p=(unsigned char *)str;
- while(*p != 0)
- {
- if(*p > 0x80)//chinese
- {//填充2*8=16个点数据
-
- if(font==FONT_MODE_12X12){
- ret=GetHzk(*p,*(p+1),sucHzk12,font);
- if(ret != 24) ret=guiGetExtHzk(*p,*(p+1),sucHzk12,font);
- if(24!=ret){
- //找不到字库,显示"口"
- memcpy(sucHzk12, g_apucCFonts16, sizeof(sucHzk12));
- }
- Rota90Degreed12(sucHzk12);
- memcpy(tempBack, &sucHzk12[12],12);
- memcpy(&sucHzk12[13],tempBack, 12);
- sucHzk12[12]=0;
- sucHzk12[25]=0;
-
- ////////////////////////////////////
- h = y % 8;//新page中的第几行
- pa = y / 8;//座落于第几page
- k1 = 8-h;//开始page中有多少位是要被处理的,且处理是高位先
- k2 = 12-k1;//下一个page中要显示多少位
-
- if(k2>8) //k3,再下一个page中要显示多少位,对于12高度来说,最多跨三个page
- {
- k3=k2-8;
- k2 = 8;
- }
- else k3=0;
-
- for(i=0;i<13;i++)
- {
- temp = (((unsigned short)sucHzk12[i+13])<<8) & 0xff00;
- temp |= ((unsigned short)sucHzk12[i])&0xff;
- for(j=0;j<k1;j++)
- {
- if(temp & 0x01)
- g_aucLcdBufF[pa][charNum+X+i] |= (1<<(h+j));
- else
- g_aucLcdBufF[pa][charNum+X+i] &= ~(1<<(h+j));
- temp >>= 1;
- }
- for(j=0;j<k2;j++)
- {
- if(temp & 0x01)
- g_aucLcdBufF[pa+1][charNum+X+i] |= (1<<(j));
- else
- g_aucLcdBufF[pa+1][charNum+X+i] &= ~(1<<(j));
- temp >>= 1;
- }
- for(j=0;j<k3;j++)
- {
- if(temp & 0x01)
- g_aucLcdBufF[pa+2][charNum+X+i] |= (1<<(j));
- else
- g_aucLcdBufF[pa+2][charNum+X+i] &= ~(1<<(j));
- temp >>= 1;
- }
- }
- p+=2;
- charNum += 12+1;//加1是让两个字体间有间隔12*12本身是基本会用完宽度的
- }else{
- ret=GetHzk(*p,*(p+1),sucHzk16,font);
- if(ret != 32) ret=guiGetExtHzk(*p,*(p+1),sucHzk16,font);
- if(32!=ret){
- //找不到字库,显示"口"
- memcpy(sucHzk16, g_apucCFonts16, sizeof(sucHzk16));
- }
-
- Rota90Degreed16(sucHzk16);
-
- ////////////////////////////////////
- h = y % 8;//新page中的第几行
- pa = y / 8;//座落于第几page
- k1 = 8-h;//开始page中有多少位是要被处理的,且处理是高位先
- k2 = 16-k1;//下一个page中要显示多少位
-
- if(k2>8) //k3,再下一个page中要显示多少位
- {
- k3=k2-8;
- k2 = 8;
- }
- else k3=0;
-
- for(i=0;i<16;i++)
- {
- temp = (((unsigned short)sucHzk16[i+16])<<8) & 0xff00;
- temp |= ((unsigned short)sucHzk16[i])&0xff;
- for(j=0;j<k1;j++)
- {
- if(temp & 0x01)
- g_aucLcdBufF[pa][charNum+X+i] |= (1<<(h+j));
- else
- g_aucLcdBufF[pa][charNum+X+i] &= ~(1<<(h+j));
- temp >>= 1;
- }
- for(j=0;j<k2;j++)
- {
- if(temp & 0x01)
- g_aucLcdBufF[pa+1][charNum+X+i] |= (1<<(j));
- else
- g_aucLcdBufF[pa+1][charNum+X+i] &= ~(1<<(j));
- temp >>= 1;
- }
- for(j=0;j<k3;j++)
- {
- if(temp & 0x01)
- g_aucLcdBufF[pa+2][charNum+X+i] |= (1<<(j));
- else
- g_aucLcdBufF[pa+2][charNum+X+i] &= ~(1<<(j));
- temp >>= 1;
- }
- }
- p+=2;
- charNum += 16;//加1是让两个字体间有间隔12*12本身是基本会用完宽度的
- }
- }else//english
- {//填充1*8=8 个点数据
- if(font==0){
- if(*p < 0x30)
- tempData = *p-0x20;
- else if(*p <= '9')
- tempData = *p-0x30+16;
- else if(*p <= '@')
- tempData = *p-0x3a+26;
- else if(*p <= 'Z')
- tempData = *p-0x41+33;
- else if(*p <= 'z')
- tempData = *p-0x61+59;
- else if(*p <= '~')
- tempData = *p-0x7b+85;
- ///////////////////////////
- ////////////////////////////////////
- h = y % 8;//新page中的第几行
- pa = y / 8;//座落于第几page
- k1 = 8-h;//开始page中有多少位是要被处理的,且处理是高位先
- k2 = 8-k1;//下一个page中要显示多少位
- if(k2>8) //k3,再下一个page中要显示多少位,对于12高度来说,最多跨三个page
- {
- k3=k2-8;
- k2 = 8;
- }
- else k3=0;
- for(i=0;i<8;i++)
- {
- temp = (((unsigned short)g_english88[tempData][i+8])<<8) & 0xff00;
- temp |= ((unsigned short)g_english88[tempData][i])&0xff;
- for(j=0;j<k1;j++)
- {
- if(temp & 0x01)
- g_aucLcdBufF[pa][charNum+X+i] |= (1<<(h+j));
- else
- g_aucLcdBufF[pa][charNum+X+i] &= ~(1<<(h+j));
- temp >>= 1;
- }
- for(j=0;j<k2;j++)
- {
- if(temp & 0x01)
- g_aucLcdBufF[pa+1][charNum+X+i] |= (1<<(j));
- else
- g_aucLcdBufF[pa+1][charNum+X+i] &= ~(1<<(j));
- temp >>= 1;
- }
- for(j=0;j<k3;j++)
- {
- if(temp & 0x01)
- g_aucLcdBufF[pa+2][charNum+X+i] |= (1<<(j));
- else
- g_aucLcdBufF[pa+2][charNum+X+i] &= ~(1<<(j));
- temp >>= 1;
- }
- }
- p++;
- charNum += 8;
- }else {
- if(*p < 0x30)
- tempData = *p-0x20;
- else if(*p <= '9')
- tempData = *p-0x30+16;
- else if(*p <= '@')
- tempData = *p-0x3a+26;
- else if(*p <= 'Z')
- tempData = *p-0x41+33;
- else if(*p <= 'z')
- tempData = *p-0x61+59;
- else if(*p <= '~')
- tempData = *p-0x7b+85;
- ///////////////////////////
- ////////////////////////////////////
- h = y % 8;//新page中的第几行
- pa = y / 8;//座落于第几page
- k1 = 8-h;//开始page中有多少位是要被处理的,且处理是高位先
- k2 = 12-k1;//下一个page中要显示多少位
- if(k2>8) //k3,再下一个page中要显示多少位,对于12高度来说,最多跨三个page
- {
- k3=k2-8;
- k2 = 8;
- }
- else k3=0;
- for(i=0;i<8;i++)
- {
- temp = (((unsigned short)g_english812[tempData][i+8])<<8) & 0xff00;
- temp |= ((unsigned short)g_english812[tempData][i])&0xff;
- for(j=0;j<k1;j++)
- {
- if(temp & 0x01)
- g_aucLcdBufF[pa][charNum+X+i] |= (1<<(h+j));
- else
- g_aucLcdBufF[pa][charNum+X+i] &= ~(1<<(h+j));
- temp >>= 1;
- }
- for(j=0;j<k2;j++)
- {
- if(temp & 0x01)
- g_aucLcdBufF[pa+1][charNum+X+i] |= (1<<(j));
- else
- g_aucLcdBufF[pa+1][charNum+X+i] &= ~(1<<(j));
- temp >>= 1;
- }
- for(j=0;j<k3;j++)
- {
- if(temp & 0x01)
- g_aucLcdBufF[pa+2][charNum+X+i] |= (1<<(j));
- else
- g_aucLcdBufF[pa+2][charNum+X+i] &= ~(1<<(j));
- temp >>= 1;
- }
- }
- p++;
- charNum += 8;
- }
-
- }
- }
- // LCDFlashPain();
- LCDFlashPainPage(X,y);
- }
- void NewDrawVLine(unsigned short x, unsigned short y, unsigned short Vlen)
- {
- unsigned short i,j,k;
- unsigned short drawVdots;//需要画紧方向的总dot数
- unsigned short leftdots; //当前page中有多少dot可用
- unsigned short thisDrawDots;//实际填充dot到当前page中的个数
- unsigned char startPage;//从哪page开始显示
-
- if(0==Vlen || x >= GLCD_WIDTH || y >= GLCD_HEIGHT) return;
- drawVdots = GLCD_HEIGHT-y;//实际可显示这么高
- if(Vlen <= drawVdots) drawVdots=Vlen;
-
- startPage=y/8;
- j=y%8;//如果是非整page段,y则是从第几个Bit开始填充
- if(j)
- {
- leftdots = 8-j;//非整page段还有这么多个dot可显示
- if(drawVdots > leftdots) thisDrawDots = leftdots;
- else thisDrawDots = drawVdots;
- for(k=0;k<thisDrawDots;k++)//所有点写1
- g_aucLcdBufF[startPage][x] |= 1<<(k+j);
- drawVdots -= thisDrawDots;
- startPage++;
- }
- if(drawVdots <=0) return;
- //以下全是完全的page了
- while(drawVdots)
- {
- if(drawVdots > 8) thisDrawDots = 8;
- else thisDrawDots = drawVdots;
- for(k=0;k<thisDrawDots;k++)
- g_aucLcdBufF[startPage][x] |= 1<<k;
- startPage++;
- drawVdots -= thisDrawDots;
- }
- }
- void GuiDrawSignalVLine(unsigned char t4) //3
- {
- MSG_INFO(1, "_t_%d_",t4);
- if(t4 == 0) return;
- // g_aucLcdBufF[1][15] &= 0xfe;
- // g_aucLcdBufF[1][13] &= 0xfe;
- // g_aucLcdBufF[1][11] &= 0xfe;
- // g_aucLcdBufF[1][9] &= 0xfe;
- // g_aucLcdBufF[1][7] &= 0xfe;
-
-
- g_aucLcdBufF[0][15] &= 0x01;
- g_aucLcdBufF[0][13] &= 0x01;
- g_aucLcdBufF[0][11] &= 0x01;
- g_aucLcdBufF[0][9] &= 0x01;
- g_aucLcdBufF[0][7] &= 0x01;
- g_aucLcdBufF[1][15] &= 0xfe;
- g_aucLcdBufF[1][13] &= 0xfe;
- g_aucLcdBufF[1][11] &= 0xfe;
- g_aucLcdBufF[1][9] &= 0xfe;
- g_aucLcdBufF[1][7] &= 0xfe;
-
-
- if(t4 <2)
- {
- //g_aucLcdBufT[0][15] = 0xff;
- g_aucLcdBufF[0][15] = 0xfe;
- g_aucLcdBufF[1][15] |= 0x01;
- }
-
- if(t4 <3)
- {
- //g_aucLcdBufT[0][13] = 0xfc;
- g_aucLcdBufF[0][13] = 0xf8;
- g_aucLcdBufF[1][13] |= 0x01;
- }
- if(t4 <4)
- {
- //g_aucLcdBufT[0][11] = 0xf0;
- g_aucLcdBufF[0][11] = 0xe0;
- g_aucLcdBufF[1][11] |= 0x01;
- }
- if(t4 <5)
- {
- //g_aucLcdBufT[0][9] = 0xc0;
- g_aucLcdBufF[0][9] = 0x80;
- g_aucLcdBufF[1][9] |= 0x01;
- }
- if(t4 < 6)
- {
- //g_aucLcdBufT[0][7] = 0x80;
- g_aucLcdBufF[1][7] |= 0x01;
- }
- LcdStatusBarFlash();
- }
- //////////////////////////////////////测试接口///////////////////////////////////
- void guiTest(void){
- static int flag=1;
- MSG_INFO(1, "DDDD:%d", flag);
- GuiDrawSignalVLine(flag);
- if(++flag>=6) flag=1;
- //guiShowBinMap(GLCD_WIDTH-15,48,"APN1.bin");
- //guiShowBinMap(1,30,"APN2.bin");
- return;
- //return;
- //char testbuf[5]={0xB2,0xE2,0xCA,0xD4,0x00};
- //??ê?DD??
- guiDrawHLine(1, GLCD_WIDTH-2, 1, 1, guiGetForeColor());
- //??ê?áD??
- guiDrawVLine(3, GLCD_HEIGHT-2, 1, 1, guiGetForeColor());
- //??ê???D???D?
- guiDrawRect(3,3,3+10,3+10,1,guiGetForeColor());
- //??ê?êμD???D?
- guiFillRect(15, 3, 15+10, 3+10,guiGetForeColor());
- //??ê??yí·
- guiDrawArrow(50, 3,10, ARROW_UP, guiGetForeColor());
- guiDrawArrow(70, 3+10,10, ARROW_DOWN, guiGetForeColor());
- guiDrawArrow(90, 3+8,10, ARROW_LEFT, guiGetForeColor());
- guiDrawArrow(110, 3+8,10, ARROW_RIGHT, guiGetForeColor());
- //??ê?12X12×?·?′?
- guiShowStr(3, 30,"123测试45中,国AW", FONT_MODE_12X12, REVERSED_NO,guiGetForeColor(),guiGetBackColor());
- //??ê?16X16×?·?′?
- guiShowStr(3, 50,"123测试45你。好AW", FONT_MODE_16X16, REVERSED_NO,guiGetForeColor(),guiGetBackColor());
- //??ê?í???
- guiShowBmp(3, 80, "Palace2.bmp");
- //??ê?°′?ü
- guiShowButton(100, 80,"B12", FONT_MODE_12X12,guiGetForeColor(), guiGetBackColor());
- }
|