From fce7d2b9bf30e09b615dbd77b4dd7db94d623bfb Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Tue, 8 Jan 2019 03:49:42 +0000 Subject: Add question dialog boxes --- examples/question.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 examples/question.rs (limited to 'examples') 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 +// 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(()) +} -- cgit v1.2.3