diff --git a/src/features/hud/mod.rs b/src/features/hud/mod.rs index 4661850..a753243 100644 --- a/src/features/hud/mod.rs +++ b/src/features/hud/mod.rs @@ -44,28 +44,19 @@ fn setup(mut commands: Commands) { button( shop::components::ButtonType::ShopOpen, ButtonVariant::Secondary, - Node { - padding: UiRect::all(px(10)), - ..default() - }, + Node::from_padding(UiRect::all(px(10))), |color| text("Shop [P]", 16.0, color) ), button( inventory::components::ButtonType::InventoryOpen, ButtonVariant::Secondary, - Node { - padding: UiRect::all(px(10)), - ..default() - }, + Node::from_padding(UiRect::all(px(10))), |color| text("Inventar", 16.0, color) ), button( ButtonType::SettingsOpen, ButtonVariant::Secondary, - Node { - padding: UiRect::all(px(10)), - ..default() - }, + Node::from_padding(UiRect::all(px(10))), |color| text("Einstellungen", 16.0, color) ) ], diff --git a/src/features/pom/ui/context_menu.rs b/src/features/pom/ui/context_menu.rs index b8b5b84..5b3165d 100644 --- a/src/features/pom/ui/context_menu.rs +++ b/src/features/pom/ui/context_menu.rs @@ -70,10 +70,7 @@ pub fn open_context_menu( action: option.clone(), }, ButtonVariant::Primary, - Node { - padding: UiRect::all(px(5)), - ..default() - }, + Node::from_padding(UiRect::all(px(5))), |c| text(option.clone().get_name(&game_config), 20.0, c), // TODO: add sprite )); } @@ -81,10 +78,7 @@ pub fn open_context_menu( parent.spawn(button( ButtonType::Cancel, ButtonVariant::Destructive, - Node { - padding: UiRect::all(px(5)), - ..default() - }, + Node::from_padding(UiRect::all(px(5))), |c| text("Abbrechen", 20.0, c), )); },