diff --git a/examples/menu.rs b/examples/menu.rs
index c6d3565..b4a9f5c 100644
--- a/examples/menu.rs
+++ b/examples/menu.rs
@@ -40,7 +40,7 @@ fn main() {
menu.add_sub_menu("Sub Test", &sub);
- let _ = window.add_menu(&menu);
+ let menu_handle = window.add_menu(&menu);
let mut color_mul = 1;
@@ -64,7 +64,7 @@ fn main() {
}
CLOSE_MENU_ID => {
println!("remove menu");
- //window.remove_menu(
+ window.remove_menu(menu_handle);
}
_ => (),
}
diff --git a/src/lib.rs b/src/lib.rs
index 12004c5..58ade2e 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -464,27 +464,27 @@ impl Window {
///
#[inline]
- pub fn add_menu(&mut self, menu: &Menu) -> Result<()> {
+ pub fn add_menu(&mut self, menu: &Menu) -> MenuHandle {
self.0.add_menu(&menu.0)
}
- /*
///
/// Updates an existing menu created with [add_menu]
///
+ /*
#[inline]
pub fn update_menu(&mut self, menu_name: &str, menu: &Vec