GGUI::DialogProps struct

Properties of ui.Dialog: a modal dialog, centred in the window. Nothing behind it takes input until it closes.

auto asking = ui.State(false);
ui.Dialog(asking, { .Title = "Unsaved changes" }, [=](UI& ui)
{
    ui.Label("Save before closing?");
    ui.Button("Save", [=] { Save(); asking.Set(false); });
});

Escape or the title bar's close button sets the state false. Focus goes to the first control on open and is restored on close.

Public variables

std::string_view Title
localised
float MinWidth
fits its content, but never narrower than this
std::string_view Class
parts: "dialog-title", "dialog-backdrop"