Fix all warnings
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use bevy::{picking::Pickable, prelude::*, text::FontSourceTemplate, ui::widget::ImageNodeSize};
|
||||
use bevy::{picking::Pickable, prelude::*, text::FontSourceTemplate};
|
||||
|
||||
use crate::{
|
||||
fighter::{FighterId, manifest::FighterManifest},
|
||||
|
||||
@@ -4,7 +4,7 @@ pub struct FighterPortrait {
|
||||
}
|
||||
|
||||
impl FighterPortrait {
|
||||
pub fn create(player_slot: usize) -> impl Scene {
|
||||
pub fn create(_player_slot: usize) -> impl Scene {
|
||||
bsn![
|
||||
Node {
|
||||
max_width: px(300),
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
use bevy::{
|
||||
picking::pointer::{PointerId, PointerLocation},
|
||||
picking::pointer::PointerId,
|
||||
prelude::*,
|
||||
};
|
||||
use bevy_egui::egui::accesskit::TextAlign;
|
||||
|
||||
use crate::{
|
||||
AppState,
|
||||
@@ -10,15 +9,14 @@ use crate::{
|
||||
game_settings::CommonAssets,
|
||||
input::{LocalInputAssignments, LocalInputSource},
|
||||
menus::{
|
||||
MenuMarker, build_menu_with_props,
|
||||
MenuMarker,
|
||||
button::FGUiButton,
|
||||
character_select::{character_box::CharacterBox, token::CharacterSelectToken},
|
||||
cursor::{FGMenuCursor, MenuCursorInputSource},
|
||||
errors::MenuErrors::{self, FighterManifestNotFound},
|
||||
errors::MenuErrors::FighterManifestNotFound,
|
||||
match_config::{MenuMatchConfig, MenuMatchPlayerSlot},
|
||||
scaling, spawn_menu,
|
||||
style::{FGUiButtonType, FGUiStyle},
|
||||
wrap_menu,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -42,10 +40,10 @@ pub fn setup_character_select(
|
||||
existing_menu: Option<Single<Entity, With<MenuMarker>>>,
|
||||
mut commands: Commands,
|
||||
manifest_registry: Res<FighterManifestRegistry>,
|
||||
assignments: Res<LocalInputAssignments>,
|
||||
_assignments: Res<LocalInputAssignments>,
|
||||
manifests: Res<Assets<FighterManifest>>,
|
||||
common_assets: Res<CommonAssets>,
|
||||
styles: Res<Assets<FGUiStyle>>,
|
||||
_common_assets: Res<CommonAssets>,
|
||||
_styles: Res<Assets<FGUiStyle>>,
|
||||
) {
|
||||
let character_boxes = manifest_registry
|
||||
.iter()
|
||||
@@ -195,7 +193,7 @@ pub fn css_auto_assign_slots(
|
||||
|
||||
#[derive(Event)]
|
||||
pub struct FighterSelectedEvent {
|
||||
slot: usize,
|
||||
_slot: usize,
|
||||
}
|
||||
|
||||
pub fn select_fighter(
|
||||
@@ -215,7 +213,7 @@ pub fn select_fighter(
|
||||
.get(&character_box.fighter_manifest)
|
||||
.ok_or(FighterManifestNotFound)?;
|
||||
match_config.set_player_fighter(slot, Some(manifest.id))?;
|
||||
commands.trigger(FighterSelectedEvent { slot });
|
||||
commands.trigger(FighterSelectedEvent { _slot: slot });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
use bevy::{ecs::query::QueryEntityError, reflect::Reflect};
|
||||
use bevy::reflect::Reflect;
|
||||
|
||||
use crate::{fighter::FighterId, menus::match_config::MenuMatchConfigErrors};
|
||||
use crate::menus::match_config::MenuMatchConfigErrors;
|
||||
|
||||
#[derive(thiserror::Error, Debug, Reflect)]
|
||||
pub enum MenuErrors {
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
use bevy::{
|
||||
prelude::*, text::FontSourceTemplate,
|
||||
ui::auto_directional_navigation::AutoDirectionalNavigation,
|
||||
};
|
||||
|
||||
use crate::{
|
||||
AppState,
|
||||
menus::{MenuMarker, button::menu_button, navigation::NavigationDefaultFocus},
|
||||
menus::{button::menu_button, navigation::NavigationDefaultFocus},
|
||||
};
|
||||
|
||||
#[derive(SceneComponent, Default, Clone)]
|
||||
@@ -58,4 +57,4 @@ impl MainMenu {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn setup_main_menu(mut commands: Commands) {}
|
||||
pub fn setup_main_menu(_commands: Commands) {}
|
||||
|
||||
+2
-3
@@ -6,7 +6,6 @@ use bevy::{
|
||||
prelude::*,
|
||||
};
|
||||
|
||||
use bevy::prelude::*;
|
||||
use ron_asset_manager::RonAssetPlugin;
|
||||
|
||||
use crate::{
|
||||
@@ -31,7 +30,7 @@ pub struct MenuMarker {}
|
||||
|
||||
pub struct MenuPlugin;
|
||||
|
||||
pub fn build_menu_scene<S>(existing_menu: Option<Single<Entity, With<MenuMarker>>>) -> impl Scene
|
||||
pub fn build_menu_scene<S>(_existing_menu: Option<Single<Entity, With<MenuMarker>>>) -> impl Scene
|
||||
where
|
||||
S: SceneComponent + Default + Clone + Send + Sync,
|
||||
{
|
||||
@@ -103,7 +102,7 @@ where
|
||||
|
||||
pub fn build_menu<S>(
|
||||
existing_menu: Option<Single<Entity, With<MenuMarker>>>,
|
||||
mut commands: Commands,
|
||||
commands: Commands,
|
||||
) where
|
||||
S: SceneComponent + Default + Clone + Send + Sync,
|
||||
{
|
||||
|
||||
@@ -10,7 +10,6 @@ use bevy::{
|
||||
prelude::*,
|
||||
ui::auto_directional_navigation::AutoDirectionalNavigator,
|
||||
};
|
||||
use bevy_egui::egui::IntoAtoms;
|
||||
use std::collections::HashSet;
|
||||
|
||||
// Action state and input handling
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
use bevy::camera::CameraProjection;
|
||||
use bevy::camera::Projection::Orthographic;
|
||||
use bevy::prelude::*;
|
||||
use bevy::window::WindowResized;
|
||||
|
||||
|
||||
@@ -6,12 +6,11 @@ use crate::{
|
||||
match_loading::initiate_match,
|
||||
menus::{
|
||||
MenuMarker,
|
||||
button::FGUiButton,
|
||||
cursor,
|
||||
match_config::MenuMatchConfig,
|
||||
spawn_menu,
|
||||
stage_select::stage_box::StageBox,
|
||||
style::{FGUiButtonType, FGUiStyle},
|
||||
style::FGUiStyle,
|
||||
},
|
||||
stage::manifest::{StageManifest, StageManifestRegistry},
|
||||
};
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
use bevy::{picking::Pickable, prelude::*, text::FontSourceTemplate, ui::widget::ImageNodeSize};
|
||||
use bevy::{picking::Pickable, prelude::*, text::FontSourceTemplate};
|
||||
|
||||
use crate::{
|
||||
fighter::{FighterId, manifest::FighterManifest},
|
||||
menus::{button::FGUiButton, style::FGUiButtonType},
|
||||
stage::manifest::{StageId, StageManifest},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user