Hi,
I tried to use rustty for my application, I have implemented an equivalent to println for rustty, but when I launch it nothing happens, and when setting Cells it prints nothing:
impl TerminalUI for Curses {
fn println_term(&mut self, startx: i32, starty: i32, value: &str) {
let mut x = startx as usize;
let mut y = starty as usize;
for c in value.chars() {
self.term[(x, y)].set_bg(Color::Red);
self.term[(x, y)].set_fg(Color::Blue);
self.term[(x, y)] = Cell::with_char(c);
x += 1;
}
}
}
...
self.println_term(3, 1, "What do you want to do?");
Hi, I tried to use rustty for my application, I have implemented an equivalent to println for rustty, but when I launch it nothing happens, and when setting Cells it prints nothing:
extern crate rustty; use self::rustty::*;
pub struct Curses { pub streams: Vec,
pub term: Terminal,
}
trait TerminalUI { fn println_term(&mut self, startx: i32, starty: i32, value: &str); }
impl TerminalUI for Curses { fn println_term(&mut self, startx: i32, starty: i32, value: &str) { let mut x = startx as usize; let mut y = starty as usize; for c in value.chars() { self.term[(x, y)].set_bg(Color::Red); self.term[(x, y)].set_fg(Color::Blue); self.term[(x, y)] = Cell::with_char(c); x += 1; } } } ... self.println_term(3, 1, "What do you want to do?");
Am I missing something? Thanks!