Skip to content

Commit

Permalink
feat: Settings Menu Implemented (#4)
Browse files Browse the repository at this point in the history
Adds a full settings system.

- [x] Settings Resources to `game_library`
- [x] Settings Plugin, Systems and Event (in `game_library`)
- [x] Adds a Settings Plugin in the game
- [x] Settings are stored and loaded from disk, and flushed on change
- [x] Settings menu is independent from Main Menu
- [x] Settings menu can be entered from anywhere (draws over screen)
- [x] Settings menu changes the settings resources and fires a Settings
Changed event
  • Loading branch information
nwesterhausen authored Jan 27, 2024
2 parents 73b51bf + cd1edd0 commit e5b8c64
Show file tree
Hide file tree
Showing 57 changed files with 2,564 additions and 911 deletions.
5 changes: 0 additions & 5 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,3 @@ rustflags = [
[target.x86_64-pc-windows-msvc]
linker = "rust-lld.exe"
rustflags = ["-Zshare-generics=n"]

# Optional: Uncommenting the following improves compile times, but reduces the amount of debug info to 'line number tables only'
# In most cases the gains are negligible, but if you are on macos and have slow compile times you should see significant gains.
[profile.dev]
debug = 1
10 changes: 0 additions & 10 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,3 @@ updates:
update-types:
- minor
- patch
- package-ecosystem: pnpm
directory: /
schedule:
interval: weekly
groups:
all:
update-types:
- patch
- minor
- major
102 changes: 101 additions & 1 deletion Cargo.lock

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

1 change: 1 addition & 0 deletions game/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ bevy-inspector-egui = "0.22.1"
winit = "0.28"
image = "0.24"
rand = "0.8.5"
bevy_pkv = "0.9.1"

[lints.rust]
unsafe_code = "forbid"
Expand Down
2 changes: 1 addition & 1 deletion game/src/app_systems.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use winit::window::Icon;
use crate::app_info;

/// Despawn all entities with the given tag (component)
pub fn despawn_screen<T: Component>(to_despawn: Query<Entity, With<T>>, mut commands: Commands) {
pub fn despawn_with_tag<T: Component>(to_despawn: Query<Entity, With<T>>, mut commands: Commands) {
for entity in &to_despawn {
commands.entity(entity).despawn_recursive();
}
Expand Down
Loading

0 comments on commit e5b8c64

Please sign in to comment.