Typing in terminal is now supported in rust teton.

This commit is contained in:
Drew Galbraith 2024-08-13 19:55:44 -07:00
parent 18e512cf1f
commit f04e720811
15 changed files with 489 additions and 13 deletions

View file

@ -0,0 +1,18 @@
use crate::console::Console;
use voyageurs::listener::KeyboardHandler;
pub struct Terminal {
console: Console,
}
impl KeyboardHandler for Terminal {
fn handle_char(&mut self, c: char) {
self.console.write_char(c)
}
}
impl Terminal {
pub fn new(console: Console) -> Self {
Self { console }
}
}