1.0.0 rewrite

This commit is contained in:
2025-09-24 22:51:34 +03:00
parent 4f8681a8c6
commit dee908a347
32 changed files with 6973 additions and 7 deletions
+24
View File
@@ -0,0 +1,24 @@
use crate::gui::SoundpadGui;
use egui::{Context, Key};
impl SoundpadGui {
pub fn handle_input(&mut self, ctx: &Context) {
ctx.input(|i| {
if i.key_pressed(Key::Escape) {
std::process::exit(0);
}
if !self.app_state.show_settings && i.key_pressed(Key::Space) {
self.play_toggle();
}
if i.key_pressed(Key::Slash) {
self.app_state.show_settings = !self.app_state.show_settings;
}
if self.app_state.show_settings && i.key_pressed(Key::Backspace) {
self.app_state.show_settings = false;
}
});
}
}