DialogProps struct
#include <GGUI/Public/UIPopups.h>
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.