GGUI::AskProps struct

Properties of ui.Ask: a dialog with a message and one button per choice.

Choosing closes it and calls the handler with the choice's index. Closing it any other way calls nothing.

auto quitting = ui.State(false);
ui.Ask(quitting, { .Title = "Quit", .Text = "Save first?", .Choices = { "Save", "Discard", "Cancel" } },
       [=](int choice) { if (choice == 0) Save(); if (choice != 2) Quit(); });

Public variables

std::string_view Title
localised, as are Text and Choices
GGText Text
may have arguments: { "Editor.Ask", { { "name", name } } }
std::initializer_list<std::string_view> Choices
a button each, in order
std::string_view Class
its style classes