Update README

This commit is contained in:
Florian Dehau 2016-11-28 10:16:50 +01:00
parent 116ee4439a
commit c7f5f34eb5

View file

@ -32,7 +32,7 @@ you may rely on the previously cited libraries to achieve such features.
```toml ```toml
[dependencies] [dependencies]
tui = "0.1" tui = "0.1.1"
``` ```
## Get Started ## Get Started
@ -44,7 +44,8 @@ The first thing to do is to choose from one of the two backends:
For Termion: For Termion:
```rust ```rust
use tui::{Terminal, TermionBackend}; use tui::Terminal;
use tui::backend::TermionBackend;
fn main() { fn main() {
let backend = TermionBackend::new().unwrap(); let backend = TermionBackend::new().unwrap();
@ -55,7 +56,8 @@ fn main() {
For Rustbox: For Rustbox:
```rust ```rust
use tui::{Terminal, RustboxBackend}; use tui::Terminal;
use tui::backend::RustboxBackend;
fn main() { fn main() {
let backend = RustboxBackend::new().unwrap(); let backend = RustboxBackend::new().unwrap();
@ -63,6 +65,17 @@ fn main() {
} }
``` ```
By default both backends are enabled but you might want to use only one. To do
so, you should disable the default-features for this library and specify the
chosen backend in features.
```toml
[dependencies.tui]
version = "0.1.1"
default-features = false
features = ['termion']
```
### Layout ### Layout
The library comes with a basic yet useful layout management object called The library comes with a basic yet useful layout management object called