diff options
author | Robin Krahl <robin.krahl@ireas.org> | 2019-01-08 03:49:42 +0000 |
---|---|---|
committer | Robin Krahl <robin.krahl@ireas.org> | 2019-01-08 04:54:39 +0100 |
commit | fce7d2b9bf30e09b615dbd77b4dd7db94d623bfb (patch) | |
tree | 5a762e9b1147329c73234e7e06aab73a3970d911 /examples | |
parent | ec84c425282c3fd26f5e862b7864ad2ae7ec1e2e (diff) | |
download | dialog-rs-fce7d2b9bf30e09b615dbd77b4dd7db94d623bfb.tar.gz dialog-rs-fce7d2b9bf30e09b615dbd77b4dd7db94d623bfb.tar.bz2 |
Add question dialog boxes
Diffstat (limited to 'examples')
-rw-r--r-- | examples/question.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/examples/question.rs b/examples/question.rs new file mode 100644 index 0000000..d9c0e91 --- /dev/null +++ b/examples/question.rs @@ -0,0 +1,12 @@ +// Copyright (C) 2019 Robin Krahl <robin.krahl@ireas.org> +// SPDX-License-Identifier: MIT + +use std::io::Result; + +use dialog::DialogBox; + +fn main() -> Result<()> { + let choice = dialog::Question::new("Do you want to continue?").show()?; + println!("The user chose: {:?}", choice); + Ok(()) +} |