Fix options menu compile errors

This commit is contained in:
Elias Stepanik 2025-06-17 23:26:27 +02:00
parent d0c4abd38b
commit ebdfbf34e2

View File

@ -1,6 +1,9 @@
use crate::plugins::environment::systems::voxels::structure::SparseVoxelOctree; use crate::plugins::environment::systems::voxels::structure::SparseVoxelOctree;
use crate::plugins::input::systems::voxels::VoxelEditMode; use crate::plugins::input::systems::voxels::VoxelEditMode;
use bevy::prelude::*; use bevy::prelude::*;
use bevy::ui::{
BackgroundColor, ButtonBundle, NodeBundle, Style, TextBundle, TextStyle, UiRect,
};
use serde::Deserialize; use serde::Deserialize;
#[derive(Deserialize, Resource)] #[derive(Deserialize, Resource)]
@ -49,7 +52,7 @@ fn setup_menu(
flex_direction: FlexDirection::Column, flex_direction: FlexDirection::Column,
..default() ..default()
}, },
background_color: Color::rgba(0.1, 0.1, 0.1, 0.5).into(), background_color: BackgroundColor(Color::srgb(0.1, 0.1, 0.1).with_alpha(0.5)),
..default() ..default()
}) })
.with_children(|parent| { .with_children(|parent| {
@ -62,7 +65,7 @@ fn setup_menu(
padding: UiRect::all(Val::Px(4.0)), padding: UiRect::all(Val::Px(4.0)),
..default() ..default()
}, },
background_color: Color::GRAY.into(), background_color: BackgroundColor(Color::srgb(0.5, 0.5, 0.5)),
..default() ..default()
}, },
MenuButton { MenuButton {
@ -109,7 +112,7 @@ fn handle_buttons(
}; };
} }
"exit" => { "exit" => {
exit.send(AppExit); exit.send(AppExit::Success);
} }
_ => {} _ => {}
} }