mirror of
https://github.com/eliasstepanik/imgui-rs.git
synced 2026-01-24 11:58:32 +00:00
[examples] test_window_impl: Add part of "modals" example
This commit is contained in:
parent
4b21834799
commit
2bec5ae4ed
@ -642,6 +642,22 @@ CTRL+click on individual component to input value.\n",
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
ui.tree_node(im_str!("Modals")).build(|| {
|
||||||
|
ui.text_wrapped(im_str!(
|
||||||
|
"Modal windows are like popups but the user cannot close \
|
||||||
|
them by clicking outside the window."
|
||||||
|
));
|
||||||
|
|
||||||
|
if ui.button(im_str!("Delete.."), (0.0, 0.0)) {
|
||||||
|
ui.open_popup(im_str!("Delete?"));
|
||||||
|
}
|
||||||
|
ui.popup_modal(im_str!("Delete?")).always_auto_resize(true).build(|| {
|
||||||
|
ui.text("All those beautiful files will be deleted.\nThis operation cannot be undone!\n\n");
|
||||||
|
ui.separator();
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user