From e5bbfc6dc49efac525fed276cd734392575616f7 Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Wed, 29 Jun 2022 01:01:31 +0200 Subject: menu.c: center play button on screen --- src/menu/src/menu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/menu/src/menu.c b/src/menu/src/menu.c index 12da1a8..41adbb5 100644 --- a/src/menu/src/menu.c +++ b/src/menu/src/menu.c @@ -27,6 +27,8 @@ int menu(void) play.on_pressed = on_pressed; play.arg = &start; play.w = 140; + play.common.hcentered = true; + play.common.vcentered = true; play.label.text = "Play"; { @@ -44,8 +46,6 @@ int menu(void) peripheral_update(&p); camera_update(&cam, &p); - play.common.x = screen_w / 2 - play.w / 2; - play.common.y = screen_h / 2 - 20; play.label.common.x = play.w / 2 - 20; play.label.common.y = 4; -- cgit v1.2.3