mirror of
https://github.com/RGBCube/serenity
synced 2025-05-23 21:05:07 +00:00
LibGUI: Add input types to GMessageBox.
Currently the two available input types are: - GMessageBox::InputType::OK (default) - GMessageBox::InputType::OKCancel Based on your choice, GMessageBox::exec() will return ExecOK or ExecCancel.
This commit is contained in:
parent
62335c5f0c
commit
a17fbd98e7
8 changed files with 63 additions and 26 deletions
|
@ -29,7 +29,7 @@ int run_shutdown_dialog(int argc, char** argv)
|
|||
GApplication app(argc, argv);
|
||||
|
||||
{
|
||||
GMessageBox box("Shut down Serenity?", "Confirm Shutdown", GMessageBox::Type::Warning, GMessageBox::InputType::OkCancel);
|
||||
GMessageBox box("Shut down Serenity?", "Confirm Shutdown", GMessageBox::Type::Warning, GMessageBox::InputType::OKCancel);
|
||||
auto result = box.exec();
|
||||
|
||||
if (result == GMessageBox::ExecOK) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue