36 static SDL_Surface *pFontGfx = NULL; /* The LCD font graphics */ |
36 static SDL_Surface *pFontGfx = NULL; /* The LCD font graphics */ |
37 static SDL_Surface *pBgSurface; /* Pointer to the application SDL screen surface */ |
37 static SDL_Surface *pBgSurface; /* Pointer to the application SDL screen surface */ |
38 static SDL_Rect dlgrect, bgrect; |
38 static SDL_Rect dlgrect, bgrect; |
39 static int fontwidth, fontheight; /* Width & height of the actual font */ |
39 static int fontwidth, fontheight; /* Width & height of the actual font */ |
40 TTF_Font *pFont = NULL; /* TTF font for buttons etc. */ |
40 TTF_Font *pFont = NULL; /* TTF font for buttons etc. */ |
|
41 static Uint32 LCDbg0 = 0; /* LCD background dark */ |
|
42 static Uint32 LCDbg1 = 0; /* LCD background light */ |
41 |
43 |
42 extern int my_shutdown; |
44 extern int my_shutdown; |
43 |
45 |
44 |
46 |
45 /*-----------------------------------------------------------------------*/ |
47 /*-----------------------------------------------------------------------*/ |
315 */ |
317 */ |
316 static void SDLGui_DrawLCD(const SGOBJ *bdlg, int objnum) |
318 static void SDLGui_DrawLCD(const SGOBJ *bdlg, int objnum) |
317 { |
319 { |
318 SDL_Rect rect; |
320 SDL_Rect rect; |
319 int x, y, w, h, offset, border = 4; |
321 int x, y, w, h, offset, border = 4; |
320 Uint32 bg0 = SDL_MapRGB(pSdlGuiScrn->format, 94,147, 69); |
|
321 Uint32 bg1 = SDL_MapRGB(pSdlGuiScrn->format,156,235, 4); |
|
322 Uint32 bc = SDL_MapRGB(pSdlGuiScrn->format, 32, 32, 32); |
322 Uint32 bc = SDL_MapRGB(pSdlGuiScrn->format, 32, 32, 32); |
323 Uint32 bg; |
323 Uint32 bg; |
324 |
324 |
|
325 LCDbg0 = SDL_MapRGB(pSdlGuiScrn->format, 94,147, 69); |
|
326 LCDbg1 = SDL_MapRGB(pSdlGuiScrn->format,156,235, 4); |
325 /* |
327 /* |
326 * Width and height are given in character columns and rows, |
328 * Width and height are given in character columns and rows, |
327 * so calculate the display size in pixels. |
329 * so calculate the display size in pixels. |
328 */ |
330 */ |
329 w = bdlg[objnum].w * (fontwidth + 2) + 10; |
331 w = bdlg[objnum].w * (fontwidth + 2) + 10; |