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 */ |
41 static Uint32 LCDbg0 = 0; /* LCD background dark */ |
42 static Uint32 LCDbg1 = 0; /* LCD background light */ |
42 static Uint32 LCDbg1 = 0; /* LCD background light */ |
43 |
43 |
44 extern int my_shutdown; |
44 extern int my_shutdown; |
45 |
45 extern int debug; |
46 |
46 |
47 |
47 |
48 /*-----------------------------------------------------------------------*/ |
48 /*-----------------------------------------------------------------------*/ |
49 /* |
49 /* |
50 * Load an 1 plane XBM into a 8 planes SDL_Surface. |
50 * Load an 1 plane XBM into a 8 planes SDL_Surface. |
612 { |
612 { |
613 int i; |
613 int i; |
614 |
614 |
615 for (i = 0; dlg[i].type != -1; i++) { |
615 for (i = 0; dlg[i].type != -1; i++) { |
616 if (dlg[i].type == LED) { |
616 if (dlg[i].type == LED) { |
|
617 if (debug) |
617 fprintf(stdout, "SDLGui_LED LED=%d on=%d\n", LED, on); |
618 fprintf(stdout, "SDLGui_LED LED=%d on=%d\n", LED, on); |
618 if (on) { |
619 if (on) { |
619 dlg[i].state |= SG_SELECTED; |
620 dlg[i].state |= SG_SELECTED; |
620 } else { |
621 } else { |
621 dlg[i].state &= ~SG_SELECTED; |
622 dlg[i].state &= ~SG_SELECTED; |
860 break; |
861 break; |
861 index++; |
862 index++; |
862 } |
863 } |
863 i++; |
864 i++; |
864 } |
865 } |
865 fprintf(stdout, "SDLGui_LCDinit=%d LCD=%dx%d %dx%d\n", i, dlg[i].x, dlg[i].y, dlg[i].w, dlg[i].h); |
866 if (debug) |
|
867 fprintf(stdout, "SDLGui_LCDinit=%d LCD=%dx%d %dx%d\n", i, dlg[i].x, dlg[i].y, dlg[i].w, dlg[i].h); |
866 |
868 |
867 *cols = dlg[i].w; |
869 *cols = dlg[i].w; |
868 *rows = dlg[i].h; |
870 *rows = dlg[i].h; |
869 *w = dlg[i].w * (fontwidth + 2) + 10; |
871 *w = dlg[i].w * (fontwidth + 2) + 10; |
870 *h = dlg[i].h * (fontheight + 2) + 4; |
872 *h = dlg[i].h * (fontheight + 2) + 4; |