Function DebugMessageBoxWithConfig

Source
pub fn DebugMessageBoxWithConfig(config: MessageBoxConfig<'_>)
Expand description

Displays a message box with the given configuration.

This function creates a message box with the provided message and optional button texts. If a task is provided, it will be executed when the button is pressed.

§Example

use std::ffi::CString;
use commonlibsse_ng::re::Misc::{DebugMessageBoxWithConfig, MessageBoxConfig};

let message = CString::new(format!("This is a {}", "message")).unwrap();

let config = MessageBoxConfig {
    message: &message,
    button_text: c"Yes",
    secondary_button_text: Some(c"No"),
    task: None,
};

DebugMessageBoxWithConfig(config);

§Message Box Layout

+--------------------------+
|    This is a message     |
|                          |
|     [Yes]     [No]       |  <-- Primary and Secondary Buttons
+--------------------------+