Macro cursive_extras::settings
source · macro_rules! settings {
($title:expr, $save_cb:expr, $($view:expr), *) => { ... };
}
Expand description
Convenience macro that generates a settings view using sub-views wrapped in a Dialog
view
Example
let mut root = cursive::default();
root.add_fullscreen_layer(
settings!(
"Settings Example", // title
|view| view.quit(), // callback if "Save" is selected
TextView::new("Option:"), // views
EditView::new()
)
);
root.run();