From: Holger Schemel Date: Mon, 2 Feb 2015 23:17:57 +0000 (+0100) Subject: added configurability of element properties button in editor X-Git-Tag: 4.0.0.0-rc1~302 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=ee8d69f9ab839ca2ea408787ab49dea683c2e5a1;p=rocksndiamonds.git added configurability of element properties button in editor --- diff --git a/src/editor.c b/src/editor.c index a9d575a5..5fc8ccd4 100644 --- a/src/editor.c +++ b/src/editor.c @@ -5298,15 +5298,20 @@ static void CreateControlButtons() } else { - gd_xoffset = DX - EX + ED_CTRL5_BUTTONS_XPOS; - gd_yoffset = DY - EY + ED_CTRL5_BUTTONS_YPOS; - width = ED_CTRL5_BUTTON_XSIZE; - height = ED_CTRL5_BUTTON_YSIZE; + int graphic = IMG_EDITOR_BUTTON_GFX_PROPERTIES; + struct GraphicInfo *gd = &graphic_info[graphic]; + struct XY ebi = editor.button.properties; - gd_x1 = DOOR_GFX_PAGEX6 + ED_CTRL5_BUTTONS_GFX_XPOS; + gd_bitmap = gd->bitmap; + gd_xoffset = DX - EX + ebi.x; + gd_yoffset = DY - EY + ebi.y; + width = gd->width; + height = gd->height; + + gd_x1 = gd->src_x; gd_x2 = 0; /* no alternative graphic for these buttons */ - gd_y1 = DOOR_GFX_PAGEY1 + ED_CTRL5_BUTTONS_GFX_YPOS; - gd_y2 = DOOR_GFX_PAGEY1 + ED_CTRL5_BUTTONS_GFX_YPOS - height; + gd_y1 = gd->src_y; + gd_y2 = gd->src_y + gd->pressed_yoffset; } if (id < ED_NUM_CTRL1_4_BUTTONS)