From 2672d9a6e8a69b95ab58788a7a3046e26f1a9377 Mon Sep 17 00:00:00 2001 From: Glenn Smith Date: Thu, 22 Sep 2022 16:06:20 -0400 Subject: [Rust API] interaction::show_message_box --- rust/src/interaction.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'rust/src') diff --git a/rust/src/interaction.rs b/rust/src/interaction.rs index 41289a14..9fe2a45b 100644 --- a/rust/src/interaction.rs +++ b/rust/src/interaction.rs @@ -123,6 +123,21 @@ pub fn get_directory_name_input(prompt: &str, default_name: &str) -> Option MessageBoxButtonResult { + let title = CString::new(title).unwrap(); + let text = CString::new(text).unwrap(); + + unsafe { BNShowMessageBox(title.as_ptr(), text.as_ptr(), buttons, icon) } +} + struct TaskContext Result<(), ()>>)>(F); pub fn run_progress_dialog Result<(), ()>>)>( -- cgit v1.3.1