Change oraganization of ui's programs (#94)
All checks were successful
Rust Checks / checks (push) Successful in 2m48s

Reviewed-on: #94
Reviewed-by: Raphaël <r.lauray@outlook.fr>
Co-authored-by: CoCo_Sol <solois.corentin@gmail.com>
Co-committed-by: CoCo_Sol <solois.corentin@gmail.com>
This commit is contained in:
CoCo_Sol 2024-03-31 23:13:53 +00:00 committed by Raphaël
parent e6a00779e9
commit 27fc86bfe4
6 changed files with 24 additions and 5 deletions

View file

@ -6,11 +6,10 @@ use networking::PlayerRank;
use serde::{Deserialize, Serialize};
pub mod camera;
pub mod hover;
pub mod map;
pub mod networking;
pub mod responsive_scale;
pub mod scenes;
pub mod ui;
/// The current scene of the game.
#[derive(Debug, Clone, Copy, Default, Eq, PartialEq, Hash, States)]

View file

@ -7,6 +7,7 @@ use border_wars::map::renderer::RendererPlugin;
use border_wars::map::selected_tile::SelectTilePlugin;
use border_wars::networking::NetworkingPlugin;
use border_wars::scenes::ScenesPlugin;
use border_wars::ui::UiPlugin;
fn main() {
App::new()
@ -17,5 +18,6 @@ fn main() {
.add_plugins(SelectTilePlugin)
.add_plugins(NetworkingPlugin)
.add_plugins(MapGenerationPlugin)
.add_plugins(UiPlugin)
.run();
}

View file

@ -3,7 +3,7 @@
use bevy::prelude::*;
use bevy_egui::EguiPlugin;
use crate::{responsive_scale, CurrentScene};
use crate::CurrentScene;
pub mod lobby;
pub mod menu;
@ -16,7 +16,6 @@ impl Plugin for ScenesPlugin {
app.add_plugins(EguiPlugin)
.add_state::<CurrentScene>()
.add_plugins(menu::MenuPlugin)
.add_plugins(lobby::LobbyPlugin)
.add_plugins(responsive_scale::ResponsiveScalingPlugin);
.add_plugins(lobby::LobbyPlugin);
}
}

View file

@ -0,0 +1,19 @@
//! The file that contains the UI logic.
pub mod hover;
pub mod responsive_scale;
use bevy::prelude::*;
use self::hover::HoverPlugin;
use self::responsive_scale::ResponsiveScalingPlugin;
/// The plugin for the UI.
pub struct UiPlugin;
impl Plugin for UiPlugin {
fn build(&self, app: &mut App) {
app.add_plugins(HoverPlugin)
.add_plugins(ResponsiveScalingPlugin);
}
}