From 2513156dc16d0eda9133c25fbe336160696b94b3 Mon Sep 17 00:00:00 2001 From: ickshonpe Date: Fri, 30 Jun 2023 21:00:32 +0100 Subject: [PATCH] added border and round corners to game menu example --- examples/games/game_menu.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/examples/games/game_menu.rs b/examples/games/game_menu.rs index 08055514bd825..b344827ccaa79 100644 --- a/examples/games/game_menu.rs +++ b/examples/games/game_menu.rs @@ -399,6 +399,8 @@ mod menu { width: Val::Px(250.0), height: Val::Px(65.0), margin: UiRect::all(Val::Px(20.0)), + border_radius: UiBorderRadius::all(Val::Px(20.)), + border: UiRect::all(Val::Px(5.)), justify_content: JustifyContent::Center, align_items: AlignItems::Center, ..default() @@ -437,9 +439,12 @@ mod menu { style: Style { flex_direction: FlexDirection::Column, align_items: AlignItems::Center, + border_radius: UiBorderRadius::all(Val::Percent(10.)), + border: UiRect::all(Val::Px(10.)), ..default() }, background_color: Color::CRIMSON.into(), + border_color: Color::MAROON.into(), ..default() }) .with_children(|parent| { @@ -468,6 +473,7 @@ mod menu { ButtonBundle { style: button_style.clone(), background_color: NORMAL_BUTTON.into(), + border_color: Color::MAROON.into(), ..default() }, MenuButtonAction::Play, @@ -489,6 +495,7 @@ mod menu { ButtonBundle { style: button_style.clone(), background_color: NORMAL_BUTTON.into(), + border_color: Color::MAROON.into(), ..default() }, MenuButtonAction::Settings, @@ -510,6 +517,7 @@ mod menu { ButtonBundle { style: button_style, background_color: NORMAL_BUTTON.into(), + border_color: Color::MAROON.into(), ..default() }, MenuButtonAction::Quit, @@ -698,6 +706,7 @@ mod menu { width: Val::Px(200.0), height: Val::Px(65.0), margin: UiRect::all(Val::Px(20.0)), + border_radius: UiBorderRadius::max(), justify_content: JustifyContent::Center, align_items: AlignItems::Center, ..default()