2015-06-06 01:08:05 +00:00
|
|
|
extern crate cursive;
|
|
|
|
|
2016-07-21 04:25:14 +00:00
|
|
|
use cursive::prelude::*;
|
2015-06-06 01:08:05 +00:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let mut siv = Cursive::new();
|
2016-07-24 23:53:12 +00:00
|
|
|
// You can load a theme from a file at runtime for fast development.
|
|
|
|
siv.load_theme_file("assets/style.toml").unwrap();
|
|
|
|
|
|
|
|
// Or you can directly load it from a string for easy deployment.
|
|
|
|
// siv.load_theme(include_str!("../assets/style.toml")).unwrap();
|
2015-06-06 01:08:05 +00:00
|
|
|
|
|
|
|
siv.add_layer(Dialog::new(TextView::new("This application uses a custom theme!"))
|
2016-06-26 00:10:18 +00:00
|
|
|
.title("Themed dialog")
|
|
|
|
.button("Quit", |s| s.quit()));
|
2015-06-06 01:08:05 +00:00
|
|
|
|
|
|
|
siv.run();
|
|
|
|
}
|