pub struct MessageBoxConfig<'a> {
pub message: &'a CStr,
pub button_text: &'a CStr,
pub secondary_button_text: Option<&'a CStr>,
pub task: Option<fn(Message)>,
}
Expand description
The configuration for displaying the message box.
Fields§
§message: &'a CStr
The message to be displayed in the message box.
Text for the primary button (defaults to "OK"
)
If a task is registered, press this button in the game to execute it.
Text for the secondary button (no secondary button if None)
task: Option<fn(Message)>
Optional task (closure) to execute when a button is pressed
FIXME: Currently not running as it crashes mysteriously.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for MessageBoxConfig<'a>
impl<'a> RefUnwindSafe for MessageBoxConfig<'a>
impl<'a> Send for MessageBoxConfig<'a>
impl<'a> Sync for MessageBoxConfig<'a>
impl<'a> Unpin for MessageBoxConfig<'a>
impl<'a> UnwindSafe for MessageBoxConfig<'a>
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