mirror of https://github.com/OpenRCT2/OpenRCT2.git
Fixed bug that caused widgets to miss draw. Fix #335
This commit is contained in:
parent
7869b8efd8
commit
068e0c3396
|
@ -1331,8 +1331,8 @@ void window_draw_widgets(rct_window *w, rct_drawpixelinfo *dpi)
|
||||||
widgetIndex = 0;
|
widgetIndex = 0;
|
||||||
for (widget = w->widgets; widget->type != WWT_LAST; widget++) {
|
for (widget = w->widgets; widget->type != WWT_LAST; widget++) {
|
||||||
// Check if widget is outside the draw region
|
// 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->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)
|
if (w->y + widget->top < dpi->y + dpi->height && w->y + widget->bottom >= dpi->y)
|
||||||
widget_draw(dpi, w, widgetIndex);
|
widget_draw(dpi, w, widgetIndex);
|
||||||
|
|
||||||
widgetIndex++;
|
widgetIndex++;
|
||||||
|
|
Loading…
Reference in New Issue