Commit 4d04f50b authored by Jeremy Soller's avatar Jeremy Soller

Handle input event from ransid

parent 742bad2f
...@@ -182,12 +182,16 @@ impl Screen for TextScreen { ...@@ -182,12 +182,16 @@ impl Screen for TextScreen {
{ {
let display = &mut self.display; let display = &mut self.display;
let changed = &mut self.changed; let changed = &mut self.changed;
let input = &mut self.input;
self.console.write(buf, |event| { self.console.write(buf, |event| {
match event { match event {
ransid::Event::Char { x, y, c, color, bold, .. } => { ransid::Event::Char { x, y, c, color, bold, .. } => {
display.char(x * 8, y * 16, c, color.data, bold, false); display.char(x * 8, y * 16, c, color.data, bold, false);
changed.insert(y); changed.insert(y);
}, },
ransid::Event::Input { data } => {
input.extend(data);
},
ransid::Event::Rect { x, y, w, h, color } => { ransid::Event::Rect { x, y, w, h, color } => {
display.rect(x * 8, y * 16, w * 8, h * 16, color.data); display.rect(x * 8, y * 16, w * 8, h * 16, color.data);
for y2 in y..y + h { for y2 in y..y + h {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment