changed handling graphics for pressed screen menu buttons
authorHolger Schemel <holger.schemel@virtion.de>
Thu, 31 Mar 2022 13:23:07 +0000 (15:23 +0200)
committerHolger Schemel <holger.schemel@virtion.de>
Thu, 31 Mar 2022 13:23:07 +0000 (15:23 +0200)
src/screens.c

index 5f1a634a25a6f93aab112e9f823c530f4a0f6942..ae7b24b95238177bf74727d845a75c9dda1cfe7f 100644 (file)
@@ -9981,6 +9981,8 @@ static void CreateScreenMenubuttons(void)
     boolean is_touch_button = menubutton_info[i].is_touch_button;
     boolean is_check_button = menubutton_info[i].check_value != NULL;
     boolean is_score_button = (screen_mask & SCREEN_MASK_SCORES_INFO);
+    boolean has_gfx_pressed = (menubutton_info[i].gfx_pressed ==
+                               menubutton_info[i].gfx_unpressed);
     Bitmap *gd_bitmap_unpressed, *gd_bitmap_pressed;
     int gfx_unpressed, gfx_pressed;
     int x, y, width, height;
@@ -10011,7 +10013,7 @@ static void CreateScreenMenubuttons(void)
     gd_x2a = gd_x2;
     gd_y2a = gd_y2;
 
-    if (is_touch_button)
+    if (has_gfx_pressed)
     {
       gd_x2 += graphic_info[gfx_pressed].pressed_xoffset;
       gd_y2 += graphic_info[gfx_pressed].pressed_yoffset;