From f5acef9e210f9dd786ca46d3bcb5d8661bd5b60e Mon Sep 17 00:00:00 2001 From: eri Date: Mon, 18 Dec 2023 20:20:50 +0100 Subject: [PATCH] =?UTF-8?q?chore:=20add=20todo=20list=20=F0=9F=93=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cargo.lock | 2 +- TODO.md | 30 ++++++++++++++++++++++++++++++ src/camera.rs | 2 -- src/input.rs | 1 - src/lib.rs | 5 ----- src/ui.rs | 5 +---- src/ui/debug.rs | 11 ++++++----- 7 files changed, 38 insertions(+), 18 deletions(-) create mode 100644 TODO.md diff --git a/Cargo.lock b/Cargo.lock index e0dc8dd..f9eb841 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2227,7 +2227,7 @@ dependencies = [ [[package]] name = "hello-bevy" -version = "0.12.2" +version = "0.12.3" dependencies = [ "bevy", "bevy-inspector-egui", diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..f93f34a --- /dev/null +++ b/TODO.md @@ -0,0 +1,30 @@ +## todo 馃摑 + +### rendering + +- [ ] pixel perfect camera + - [ ] render to smaller surface + - [ ] upscale the surface an integer amount, with borders + - [ ] add smooth camera + +### ui + +- [ ] expand ui elements with components +- [ ] tweening and animation (https://github.com/djeedai/bevy_tweening) +- [ ] rounded button corners (bevy 0.13) +- [ ] inspector + - [ ] add assets and resources + - [ ] resize viewport when opened +- [ ] settings + - [ ] add back keyboard remapping + - [ ] replace key names with icons from kenney (once they release) + - [ ] color picker + - [ ] scrollable settings (bevy 0.13) + +### project + +- [ ] separate input and camera into crates +- [ ] add example games + - [ ] doodle jump + - [ ] suika +- [ ] update to bevy-main diff --git a/src/camera.rs b/src/camera.rs index 8a103e6..df980d9 100644 --- a/src/camera.rs +++ b/src/camera.rs @@ -9,8 +9,6 @@ use crate::{ GameState, }; -// TODO: Option for pixel perfect smooth upscaling camera - // 路路路路路路 // Plugin // 路路路路路路 diff --git a/src/input.rs b/src/input.rs index 196561d..ec6dabb 100644 --- a/src/input.rs +++ b/src/input.rs @@ -284,7 +284,6 @@ pub enum KeyBind { impl ToString for KeyBind { fn to_string(&self) -> String { - // TODO: Replace this with a key icon lookup, maybe use the ones from kenney once released match self { KeyBind::Key(key) => format!("{:?}", key), KeyBind::Mouse(button) => format!("m{:?}", button), diff --git a/src/lib.rs b/src/lib.rs index c99c5d1..bd7da02 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -26,11 +26,6 @@ pub use crate::{ }, }; -// TODO: Make todo and changelog file, create a real versioning system (maybe project in gh) -// TODO: Add example games (port the doodle jump from python, maybe something like suika) -// TODO: Try to port to bevy-main -// TODO: Separate input and camera into crates - // [CHANGE]: Game title and resolution pub const GAME_TITLE: &str = "Hello Bevy!"; pub const INITIAL_RESOLUTION: Vec2 = Vec2::new(600., 600.); diff --git a/src/ui.rs b/src/ui.rs index 34d7cd1..e6c13c9 100644 --- a/src/ui.rs +++ b/src/ui.rs @@ -23,10 +23,6 @@ pub const UI_LAYER: RenderLayers = RenderLayers::layer(1); pub const FONT_MULTIPLIERS: [f32; 3] = [2.0, 1.0, 0.8]; pub const FONT_SIZES: [f32; 5] = [16.0, 20.0, 24.0, 28.0, 32.0]; -// TODO: Ui elements with components -// TODO: Tweening and animation (Look into https://github.com/djeedai/bevy_tweening) -// TODO: Rounded button corners (Requires #8973 to be merged in 0.13) - // 路路路路路路 // Plugin // 路路路路路路 @@ -212,6 +208,7 @@ impl<'a> UIText<'a> { } // Button +// TODO: Rounded button corners (Requires #8973 to be merged in 0.13) struct UIButton { button: ButtonBundle, diff --git a/src/ui/debug.rs b/src/ui/debug.rs index 0529232..cd4f082 100644 --- a/src/ui/debug.rs +++ b/src/ui/debug.rs @@ -127,14 +127,17 @@ mod only_in_debug { fn handle_keys( mut state: ResMut, - mut _win: Query<&mut Window>, + mut win: Query<&mut Window, With>, keys: Res>, ) { if keys.just_pressed(KeyCode::I) { state.inspector = !state.inspector; - } - // TODO: Resize window / Viewport + if let Ok(mut win) = win.get_single_mut() { + win.resolution.set(1000., 600.); + // TODO: Propper resolution and resize viewport + } + } } fn update_fps( @@ -216,7 +219,5 @@ mod only_in_debug { ui.allocate_space(ui.available_size()); }); }); - - // TODO: Assets & resources } }