canvas.addInteractionRegion(dragListener);
for (PositionalWidget widget : widgets) {
if (!widget.isVisible()) {
continue;
}
Vector2i screenStart = worldToScreen(widget.getPosition());
Vector2f worldEnd = new Vector2f(widget.getPosition());
worldEnd.add(widget.getSize());
Vector2i screenEnd = worldToScreen(worldEnd);
canvas.drawWidget(widget, Rect2i.createFromMinAndMax(screenStart, screenEnd));
}
}