Add more themes and rustfmt

This commit is contained in:
2026-02-16 22:12:29 +00:00
parent 6d6815af02
commit edd2f7e6b5
36 changed files with 854 additions and 329 deletions

View File

@@ -20,23 +20,25 @@ impl EventHandler {
let (tx, rx) = mpsc::channel();
let _tx = tx.clone();
thread::spawn(move || loop {
if event::poll(tick_rate).unwrap_or(false) {
match event::read() {
Ok(Event::Key(key)) => {
if tx.send(AppEvent::Key(key)).is_err() {
return;
thread::spawn(move || {
loop {
if event::poll(tick_rate).unwrap_or(false) {
match event::read() {
Ok(Event::Key(key)) => {
if tx.send(AppEvent::Key(key)).is_err() {
return;
}
}
}
Ok(Event::Resize(w, h)) => {
if tx.send(AppEvent::Resize(w, h)).is_err() {
return;
Ok(Event::Resize(w, h)) => {
if tx.send(AppEvent::Resize(w, h)).is_err() {
return;
}
}
_ => {}
}
_ => {}
} else if tx.send(AppEvent::Tick).is_err() {
return;
}
} else if tx.send(AppEvent::Tick).is_err() {
return;
}
});