projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
726bae2
)
added configurability of element properties button in editor
author
Holger Schemel
<info@artsoft.org>
Mon, 2 Feb 2015 23:17:57 +0000
(
00:17
+0100)
committer
Holger Schemel
<info@artsoft.org>
Mon, 2 Feb 2015 23:17:57 +0000
(
00:17
+0100)
src/editor.c
patch
|
blob
|
history
diff --git
a/src/editor.c
b/src/editor.c
index a9d575a50d3ceae155d908df2126b5c530c4ba70..5fc8ccd439f779762a697f5559ad9dfba73f1d35 100644
(file)
--- a/
src/editor.c
+++ b/
src/editor.c
@@
-5298,15
+5298,20
@@
static void CreateControlButtons()
}
else
{
}
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_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 - heigh
t;
+ gd_y1 =
gd->src_y
;
+ gd_y2 =
gd->src_y + gd->pressed_yoffse
t;
}
if (id < ED_NUM_CTRL1_4_BUTTONS)
}
if (id < ED_NUM_CTRL1_4_BUTTONS)