Centre a label on M5Stack
-
Do you know how I can automatically centre a label in the exact centre of the screen?
-
I assume you have changing text in the label. For the Y-axis set the label manually to the half of screen height minus the half of label height. The X-axis can be calculated by using half of screen width and half of label width
label0.get_width()
. -
@holofloh wow, I have never considered this, thanks for posting. I will add it to my guides.