Skip to content

Commit

Permalink
added border and round corners to game menu example
Browse files Browse the repository at this point in the history
  • Loading branch information
ickshonpe committed Jun 30, 2023
1 parent c575717 commit 2513156
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions examples/games/game_menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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| {
Expand Down Expand Up @@ -468,6 +473,7 @@ mod menu {
ButtonBundle {
style: button_style.clone(),
background_color: NORMAL_BUTTON.into(),
border_color: Color::MAROON.into(),
..default()
},
MenuButtonAction::Play,
Expand All @@ -489,6 +495,7 @@ mod menu {
ButtonBundle {
style: button_style.clone(),
background_color: NORMAL_BUTTON.into(),
border_color: Color::MAROON.into(),
..default()
},
MenuButtonAction::Settings,
Expand All @@ -510,6 +517,7 @@ mod menu {
ButtonBundle {
style: button_style,
background_color: NORMAL_BUTTON.into(),
border_color: Color::MAROON.into(),
..default()
},
MenuButtonAction::Quit,
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 2513156

Please sign in to comment.