canvas.addInteractionRegion(interactionListener);
}
@Override
public Vector2i getPreferredContentSize(Canvas canvas, Vector2i areaHint) {
Font font = canvas.getCurrentStyle().getFont();
String text = "";
if (capturingInput) {
text = "???";
} else if (input.get() != null) {
text = input.get().getDisplayName();
}
List<String> lines = TextLineBuilder.getLines(font, text, areaHint.getX());
Vector2i size = font.getSize(lines);
return size;
}