From: Holger Schemel Date: Thu, 14 Feb 2019 21:28:28 +0000 (+0100) Subject: fixed bug with ignoring defined size for some main menu buttons X-Git-Tag: 4.1.2.0~12 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=9c5174d87844a91c6f608006d57e36063a5324d4;p=rocksndiamonds.git fixed bug with ignoring defined size for some main menu buttons This is a regression bug caused by commit e17dc52b, which changed the handling of main menu buttons for first level, last level and level number from "simple screen buttons" to "real gadgets". Unfortunately, it also caused ignoring their width and height, instead using the "default button size" of 32x32 pixels for them, regardless of their width and height defined to other values in file "graphicsinfo.conf". --- diff --git a/src/screens.c b/src/screens.c index 175bae6f..7b25e79f 100644 --- a/src/screens.c +++ b/src/screens.c @@ -8497,16 +8497,8 @@ static void CreateScreenMenubuttons(void) menubutton_info[i].get_gadget_position(&x, &y, id); - if (menubutton_info[i].screen_mask == SCREEN_MASK_MAIN_HAS_SOLUTION) - { - width = graphic_info[menubutton_info[i].gfx_pressed].width; - height = graphic_info[menubutton_info[i].gfx_pressed].height; - } - else - { - width = SC_MENUBUTTON_XSIZE; - height = SC_MENUBUTTON_YSIZE; - } + width = graphic_info[menubutton_info[i].gfx_pressed].width; + height = graphic_info[menubutton_info[i].gfx_pressed].height; gfx_unpressed = menubutton_info[i].gfx_unpressed; gfx_pressed = menubutton_info[i].gfx_pressed;