diff options
Diffstat (limited to 'apps/plugins/reversi/reversi-gui.c')
-rw-r--r-- | apps/plugins/reversi/reversi-gui.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/apps/plugins/reversi/reversi-gui.c b/apps/plugins/reversi/reversi-gui.c index e6613d6a25..e59a91e341 100644 --- a/apps/plugins/reversi/reversi-gui.c +++ b/apps/plugins/reversi/reversi-gui.c | |||
@@ -167,14 +167,14 @@ static bool game_finished; | |||
167 | #define B_QUIT_H (LCD_HEIGHT/4) | 167 | #define B_QUIT_H (LCD_HEIGHT/4) |
168 | #else | 168 | #else |
169 | /* Define Menu button x, y, width, height */ | 169 | /* Define Menu button x, y, width, height */ |
170 | #define B_MENU_X (LCD_WIDTH/2) | 170 | #define B_MENU_X (LCD_WIDTH/2 - XOFS) |
171 | #define B_MENU_Y (CELL_HEIGHT*BOARD_SIZE+YOFS*2) | 171 | #define B_MENU_Y (CELL_HEIGHT*BOARD_SIZE+YOFS*2) |
172 | #define B_MENU_W (LCD_WIDTH/4) | 172 | #define B_MENU_W (LCD_WIDTH/4 - XOFS) |
173 | #define B_MENU_H (2*CELL_HEIGHT) | 173 | #define B_MENU_H (2*CELL_HEIGHT) |
174 | /* Define Quit Button x, y, width, height */ | 174 | /* Define Quit Button x, y, width, height */ |
175 | #define B_QUIT_X (LCD_WIDTH-LCD_WIDTH/4) | 175 | #define B_QUIT_X (B_MENU_X + B_MENU_W + 1) |
176 | #define B_QUIT_Y (CELL_HEIGHT*BOARD_SIZE+YOFS*2) | 176 | #define B_QUIT_Y (CELL_HEIGHT*BOARD_SIZE+YOFS*2) |
177 | #define B_QUIT_W (LCD_WIDTH/4) | 177 | #define B_QUIT_W (LCD_WIDTH/4 - XOFS) |
178 | #define B_QUIT_H (2*CELL_HEIGHT) | 178 | #define B_QUIT_H (2*CELL_HEIGHT) |
179 | #endif | 179 | #endif |
180 | 180 | ||
@@ -316,22 +316,16 @@ static void reversi_gui_display_board(void) { | |||
316 | y = LEGEND_Y(0); | 316 | y = LEGEND_Y(0); |
317 | reversi_gui_draw_cell(x, y+(LEGEND_Y(1)-LEGEND_Y(0))/2-CELL_WIDTH/2, BLACK); | 317 | reversi_gui_draw_cell(x, y+(LEGEND_Y(1)-LEGEND_Y(0))/2-CELL_WIDTH/2, BLACK); |
318 | rb->snprintf(buf, sizeof(buf), "%01d", c); | 318 | rb->snprintf(buf, sizeof(buf), "%01d", c); |
319 | |||
320 | rb->viewport_set_defaults(&tempvp, SCREEN_MAIN); | ||
319 | 321 | ||
320 | tempvp.x=x+CELL_WIDTH+2; | 322 | tempvp.x=x+CELL_WIDTH+2; |
321 | tempvp.y=y; | 323 | tempvp.y=y; |
322 | tempvp.width=LCD_WIDTH-tempvp.x; | 324 | tempvp.width=LCD_WIDTH-tempvp.x; |
323 | tempvp.height=LEGEND_Y(1); | 325 | tempvp.height=LEGEND_Y(1); |
324 | |||
325 | tempvp.font=FONT_UI; | ||
326 | tempvp.drawmode=STYLE_DEFAULT; | ||
327 | #if LCD_DEPTH > 1 | 326 | #if LCD_DEPTH > 1 |
328 | tempvp.fg_pattern=0; | 327 | tempvp.fg_pattern = LCD_BLACK; |
329 | tempvp.bg_pattern=0xFFFF; | 328 | tempvp.bg_pattern = LCD_WHITE; |
330 | #ifdef HAVE_LCD_COLOR | ||
331 | tempvp.lss_pattern=0; | ||
332 | tempvp.lse_pattern=0; | ||
333 | tempvp.lst_pattern=0; | ||
334 | #endif | ||
335 | #endif | 329 | #endif |
336 | 330 | ||
337 | rb->screens[SCREEN_MAIN]->set_viewport(&tempvp); | 331 | rb->screens[SCREEN_MAIN]->set_viewport(&tempvp); |