1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-23 15:52:55 +01:00

add drawing of some widgets

This commit is contained in:
IntelOrca
2014-04-09 22:35:29 +01:00
parent d86799e8fc
commit 5f74540a0f
9 changed files with 732 additions and 11 deletions

View File

@@ -592,5 +592,22 @@ static int window_draw_split(rct_window *w, int left, int top, int right, int bo
*/
void window_draw_widgets(rct_window *w, rct_drawpixelinfo *dpi)
{
RCT2_CALLPROC_X(0x006EB15C, 0, 0, 0, 0, w, dpi, 0);
rct_widget *widget;
int widgetIndex;
// RCT2_CALLPROC_X(0x006EB15C, 0, 0, 0, 0, w, dpi, 0);
// return;
if ((w->flags & WF_TRANSPARENT) && !(w->flags & 0x20))
gfx_fill_rect(dpi, w->x, w->y, w->x + w->width - 1, w->y + w->height - 1, 0x2000000 | 51);
widgetIndex = 0;
for (widget = w->widgets; widget->type != WWT_LAST; widget++) {
// Check if widget is outside the draw region
if (w->x + widget->left < dpi->x + dpi->width && w->x + widget->right > dpi->x)
if (w->y + widget->top < dpi->y + dpi->height && w->y + widget->bottom > dpi->y)
widget_draw(dpi, w, widgetIndex);
widgetIndex++;
}
}