From 70a12b984c1a6d4b77ddde2a5147496f0dd49958 Mon Sep 17 00:00:00 2001 From: Rendo Date: Tue, 18 Nov 2025 00:24:55 +0500 Subject: [PATCH] Fixed main menu layout --- src/ui/main_menu.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/ui/main_menu.rs b/src/ui/main_menu.rs index 37002bc..75a539e 100644 --- a/src/ui/main_menu.rs +++ b/src/ui/main_menu.rs @@ -16,9 +16,8 @@ pub fn setup_menu(mut commands: Commands) { TextLayout::new_with_justify(Justify::Center), Menu, Node { - position_type: PositionType::Absolute, - top: percent(25), - right: percent(33), + align_self: AlignSelf::Center, + justify_self: JustifySelf::Center, ..default() }, )); @@ -26,15 +25,15 @@ pub fn setup_menu(mut commands: Commands) { commands.spawn(( Button, Node { - width: px(150), - height: px(65), - border: UiRect::all(px(5)), + align_self: AlignSelf::Center, + justify_self: JustifySelf::Center, + top: px(128), justify_content: JustifyContent::Center, align_items: AlignItems::Center, ..default() }, Menu, - children![(Text::new("Igron"))], + children![(Text::new("Play"))], )); }