Skip to content

Commit

Permalink
change: improve inspector ui 👓
Browse files Browse the repository at this point in the history
  • Loading branch information
eerii committed Dec 18, 2023
1 parent 5fbfdb6 commit 4146c2f
Show file tree
Hide file tree
Showing 8 changed files with 175 additions and 97 deletions.
35 changes: 18 additions & 17 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ bevy_asset_loader = { version = "0.18", features = [ "progress_tracking" ] } # B
bevy_embedded_assets = { version = "0.9" } # Embed assets in binary
bevy_kira_audio = { version = "0.18" } # Improved audio library
iyes_progress = { version = "0.10", features = [ "assets" ] } # Track loading and game state
bevy-inspector-egui = { version = "0.21" } # Inspector
bevy-persistent = { version = "0.4", features = ["toml"] } # Persistent values (for saving)

# Core
rand = { version = "0.8" }
serde = { version = "1.0", features = ["derive"] }

# Debug
bevy-inspector-egui = { version = "0.21" } # Inspector
3 changes: 2 additions & 1 deletion examples/jump.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ impl Plugin for SampleGamePlugin {
resume_game,
),
)
.register_type::<Player>()
.add_systems(
Update,
update_sample.run_if(in_state(GameState::Play)),
Expand All @@ -51,7 +52,7 @@ impl Plugin for SampleGamePlugin {
// Components
// ··········

#[derive(Component)]
#[derive(Reflect, Component, Default)]
struct Player {
velocity: Vec2,
}
Expand Down
2 changes: 1 addition & 1 deletion src/camera.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ impl Plugin for CameraPlugin {
// ··········

#[derive(Component)]
struct GameCamera;
pub struct GameCamera;

// ·······
// Systems
Expand Down
69 changes: 0 additions & 69 deletions src/debug.rs

This file was deleted.

1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ mod assets;
mod audio;
mod camera;
mod data;
mod debug;
mod input;
mod ui;

Expand Down
2 changes: 1 addition & 1 deletion src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ struct UIStyle {
// ··········

#[derive(Component)]
struct UiCamera;
pub struct UiCamera;

#[derive(Component)]
struct UiNode;
Expand Down
Loading

0 comments on commit 4146c2f

Please sign in to comment.