Skip to content

robinwils/cursive-desc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cursive-desc

JSON description frontend for the cursive library

Examples dir will show you some sample code.

Simple TextView:

use cursive::Cursive;
use cursive_desc::from_str;

fn main() {
    let data = r#"
        {
            "view": "TextView",
            "content": "Hello World!",
            "effect": "bold"
        }"#;

    let mut siv = cursive::default();

    // We can quit by pressing `q`
    siv.add_global_callback('q', Cursive::quit);

    siv.add_layer(from_str(data).expect("cannot create view"));

    // Run the event loop
    siv.run();

About

XML description frontend for the cursive library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages