aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2013-03-20 23:23:47 -0500
committerJesse Luehrs <doy@tozt.net>2013-03-20 23:23:47 -0500
commit48e6a8e80f89ff37c9221eebae254e9a6d079ee6 (patch)
tree0e00004ef17f3214ac451df9a51c4b8d8017553e
parent8192a07c2696b7313dd509a7e474ff7fc79d9bdb (diff)
downloadrust-term-48e6a8e80f89ff37c9221eebae254e9a6d079ee6.tar.gz
rust-term-48e6a8e80f89ff37c9221eebae254e9a6d079ee6.zip
couple tweaks
-rw-r--r--src/info.rs17
-rw-r--r--test/rl.rs2
2 files changed, 2 insertions, 17 deletions
diff --git a/src/info.rs b/src/info.rs
index d1b3695..3b71b1f 100644
--- a/src/info.rs
+++ b/src/info.rs
@@ -17,23 +17,6 @@ pub fn move (col: uint, row: uint) {
}
}
-/*
-pub fn color_name (name: &str) -> u8 {
-}
-
-pub fn color_rgb (r: u8, g: u8, b: u8) -> u8 {
-}
-
-pub fn color (color: u8) {
-}
-
-pub fn bold (enabled: bool) {
-}
-
-pub fn reverse (enabled: bool) {
-}
-*/
-
pub fn cursor (enabled: bool) {
if enabled {
write_escape("civis");
diff --git a/test/rl.rs b/test/rl.rs
index c6c3b1b..f2ad637 100644
--- a/test/rl.rs
+++ b/test/rl.rs
@@ -39,6 +39,7 @@ fn main () {
draw_map(rows, cols);
let mut (x, y) = (0u, 0u);
+ let mut cursor = true;
loop {
draw_character(x, y);
match io::stdin().read_char() {
@@ -47,6 +48,7 @@ fn main () {
'j' if y < rows - 1 => { draw_ground(x, y); y += 1 }
'k' if y > 0 => { draw_ground(x, y); y -= 1 }
'l' if x < cols - 1 => { draw_ground(x, y); x += 1 }
+ ' ' => { term::info::cursor(cursor); cursor = !cursor }
_ => { }
}
}