for (int x = 0; x < 9; x++)
{
int widgetIndex = y * 9 + x + currentScroll * 9;
if (0 <= widgetIndex && widgetIndex < listSize)
{
AbstractFluidWidget widget = fluidWidgets.get(widgetIndex);
widget.drawWidget(x * 18 + 7, y * 18 - 1);
} else
{
break outerLoop;
}
}