+2014-10-20
+ * fixed using buttons on main screen with size other than 32x32 pixels
+
2014-10-17
* removed some remaining unused X11 stuff
* fixed bug with potentially suppressed exit error message on startup
-#define COMPILE_DATE_STRING "2014-10-18 00:15"
+#define COMPILE_DATE_STRING "2014-10-20 23:13"
/* calculate size for non-clickable text -- needed for text alignment */
boolean calculate_text_size = (pos_button == NULL && text != NULL);
+ if (pos_text->width == -1 || calculate_text_size)
+ pos_text->width = text_width;
+ if (pos_text->height == -1 || calculate_text_size)
+ pos_text->height = text_height;
+
if (visibleMenuPos(pos_button))
{
if (pos_text->x == -1)
pos_text->x = pos_button->x + pos_button->width;
if (pos_text->y == -1)
- pos_text->y = pos_button->y;
+ pos_text->y =
+ pos_button->y + (pos_button->height - pos_text->height) / 2;
}
-
- if (pos_text->width == -1 || calculate_text_size)
- pos_text->width = text_width;
- if (pos_text->height == -1 || calculate_text_size)
- pos_text->height = text_height;
}
if (pos_input != NULL) /* (x/y may be -1/-1 here) */
void DrawFixedGraphicThruMaskExt(DrawBuffer *d, int dst_x, int dst_y,
int graphic, int frame)
{
+ struct GraphicInfo *g = &graphic_info[graphic];
Bitmap *src_bitmap;
int src_x, src_y;
getFixedGraphicSource(graphic, frame, &src_bitmap, &src_x, &src_y);
- BlitBitmapMasked(src_bitmap, d, src_x, src_y, TILEX, TILEY, dst_x, dst_y);
+ BlitBitmapMasked(src_bitmap, d, src_x, src_y, g->width, g->height,
+ dst_x, dst_y);
}
void DrawSizedGraphic(int x, int y, int graphic, int frame, int tilesize)