fix: Update load popup to use UI components
This commit is contained in:
@@ -45,22 +45,18 @@ pub fn spawn_load_popup(commands: &mut Commands) {
|
|||||||
TextFont::from_font_size(40.0),
|
TextFont::from_font_size(40.0),
|
||||||
TextColor(Color::WHITE),
|
TextColor(Color::WHITE),
|
||||||
),
|
),
|
||||||
(
|
pill_button(
|
||||||
Button,
|
|
||||||
ButtonType::PopupClose,
|
ButtonType::PopupClose,
|
||||||
|
ButtonVariant::Destructive,
|
||||||
Node {
|
Node {
|
||||||
width: px(40.0),
|
width: px(40),
|
||||||
height: px(40.0),
|
height: px(40),
|
||||||
justify_content: JustifyContent::Center,
|
justify_content: JustifyContent::Center,
|
||||||
align_items: AlignItems::Center,
|
align_items: AlignItems::Center,
|
||||||
..default()
|
..default()
|
||||||
},
|
},
|
||||||
BackgroundColor(Color::srgb(0.8, 0.2, 0.2)),
|
"X",
|
||||||
children![(
|
24.0
|
||||||
Text::new("X"),
|
|
||||||
TextFont::from_font_size(24.0),
|
|
||||||
TextColor(Color::WHITE),
|
|
||||||
)]
|
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
));
|
));
|
||||||
@@ -81,6 +77,7 @@ pub fn spawn_load_popup(commands: &mut Commands) {
|
|||||||
ButtonType::SavegameLoad {
|
ButtonType::SavegameLoad {
|
||||||
savegame_path: savegame.path.clone(),
|
savegame_path: savegame.path.clone(),
|
||||||
},
|
},
|
||||||
|
ButtonVariant::Secondary,
|
||||||
Node {
|
Node {
|
||||||
width: percent(100),
|
width: percent(100),
|
||||||
height: px(80),
|
height: px(80),
|
||||||
@@ -91,7 +88,8 @@ pub fn spawn_load_popup(commands: &mut Commands) {
|
|||||||
padding: UiRect::horizontal(px(10.0)),
|
padding: UiRect::horizontal(px(10.0)),
|
||||||
..default()
|
..default()
|
||||||
},
|
},
|
||||||
BackgroundColor(NORMAL_BUTTON),
|
BackgroundColor(ButtonVariant::Secondary.normal_background()),
|
||||||
|
BorderRadius::all(px(10)),
|
||||||
children![
|
children![
|
||||||
(
|
(
|
||||||
Node {
|
Node {
|
||||||
@@ -121,24 +119,21 @@ pub fn spawn_load_popup(commands: &mut Commands) {
|
|||||||
)
|
)
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
(
|
pill_button(
|
||||||
Button,
|
|
||||||
ButtonType::SavegameDelete {
|
ButtonType::SavegameDelete {
|
||||||
savegame_path: savegame.path.clone()
|
savegame_path: savegame.path.clone()
|
||||||
},
|
},
|
||||||
|
ButtonVariant::Destructive,
|
||||||
Node {
|
Node {
|
||||||
width: px(40.0),
|
width: px(40),
|
||||||
height: px(40.0),
|
height: px(40),
|
||||||
justify_content: JustifyContent::Center,
|
justify_content: JustifyContent::Center,
|
||||||
align_items: AlignItems::Center,
|
align_items: AlignItems::Center,
|
||||||
..default()
|
..default()
|
||||||
},
|
},
|
||||||
children![(
|
"X",
|
||||||
Text::new("X"),
|
24.0
|
||||||
TextFont::from_font_size(24.0),
|
),
|
||||||
TextColor(Color::srgb(0.9, 0.9, 0.9))
|
|
||||||
)]
|
|
||||||
)
|
|
||||||
],
|
],
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user