onLoad method
Loads the button's components (background and text).
Implementation
@override
Future<void> onLoad() async {
background = RectangleComponent(size: size, paint: Paint()..color = color);
text = TextComponent(
text: label,
anchor: Anchor.center,
position: size / 2,
textRenderer: TextPaint(style: TextStyle(color: textColor, fontSize: 10)),
);
addAll([background, text]);
}