aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorTeddy Wing2016-08-05 22:24:29 -0400
committerTeddy Wing2016-08-05 22:24:29 -0400
commit0ba6ef6cbaf2a4b7ffd82779b1a7713ed7a3d724 (patch)
tree1126617873b48d337127559f8319e9a63ea4b6e0 /src/main.rs
parent5e433fb0d12198301e2a05727899b7312a31e47e (diff)
downloadPassextract-0ba6ef6cbaf2a4b7ffd82779b1a7713ed7a3d724.tar.bz2
Add an arrow marker
Print a URLView-like arrow for choice selection.
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index e8b4631..d43a8f1 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,6 +1,6 @@
extern crate rustty;
-use rustty::{Terminal, Event};
+use rustty::{Terminal, Event, Cell, Color, Attr};
use rustty::ui::Painter;
use std::time::Duration;
@@ -9,9 +9,16 @@ fn main() {
let mut term = Terminal::new().unwrap();
term.swap_buffers().unwrap();
+ let knockout_cell = Cell::with_style(Color::Byte(0x07), Color::Black, Attr::Default);
+
loop {
term.printline(0, 0, "Passextract (Press q or Ctrl-C to quit)");
+ term.printline_with_cell(0, 2, "->", knockout_cell);
+ term.printline(5, 2, "test");
+
+ term.set_cursor(2, 2).unwrap();
+
let evt = term.get_event(Duration::from_millis(100)).unwrap();
if let Some(Event::Key(ch)) = evt {
match ch {