mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:38:12 +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
|
@ -50,7 +50,7 @@ int main(int argc, char** argv)
|
|||
auto filename = picker.selected_file().string();
|
||||
auto bitmap = load_png(filename);
|
||||
if (!bitmap) {
|
||||
GMessageBox msgbox(String::format("Failed to load '%s'", filename.characters()), "Open failed", GMessageBox::Type::Error, window);
|
||||
GMessageBox msgbox(String::format("Failed to load '%s'", filename.characters()), "Open failed", GMessageBox::Type::Error, GMessageBox::InputType::OK, window);
|
||||
msgbox.exec();
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue