pub struct DialogBuilder { /* private fields */ }
Expand description
Used for constructing and opening a modal dialog. This can be used
to both set the title/body/icon of the modal and open it as a one-time call
(as opposed to a continous call in the update loop) at the same time.
Make sure to call DialogBuilder::open
to actually open the dialog.
Implementations§
Source§impl DialogBuilder
impl DialogBuilder
Sourcepub fn with_title(self, title: impl Display) -> Self
pub fn with_title(self, title: impl Display) -> Self
Construct this dialog with the given title.
Sourcepub fn open(self)
pub fn open(self)
Open the dialog.
⚠️ WARNING ⚠️: This function requires a write lock to the egui::Context
. Using it within
closures within functions like egui::Ui::input_mut
will result in a deadlock. Tracking issue
Auto Trait Implementations§
impl Freeze for DialogBuilder
impl !RefUnwindSafe for DialogBuilder
impl Send for DialogBuilder
impl Sync for DialogBuilder
impl Unpin for DialogBuilder
impl !UnwindSafe for DialogBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more