diff options
author | Monroe Clinton <contact@monroeclinton.com> | 2022-10-02 12:30:11 -0400 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-10-02 21:28:26 +0200 |
commit | 67300af248167e2f0cef425a67fa21dee2f04a3f (patch) | |
tree | 33b069a90538db7620516a515205d6bf1ba13346 | |
parent | 2a9128efe3237d75963b81e908c5f54d01295c32 (diff) | |
download | serenity-67300af248167e2f0cef425a67fa21dee2f04a3f.zip |
Games: Wrong parent window passed to GUI::MessageBox
We were passing the wrong parent window to GUI::MessageBox making
it impossible to exit the message window.
-rw-r--r-- | Userland/Games/2048/main.cpp | 4 | ||||
-rw-r--r-- | Userland/Games/Hearts/main.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Games/2048/main.cpp b/Userland/Games/2048/main.cpp index e741bf8149..c248af6b5d 100644 --- a/Userland/Games/2048/main.cpp +++ b/Userland/Games/2048/main.cpp @@ -112,11 +112,11 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) Config::write_i32("2048"sv, ""sv, "target_tile"sv, target_tile); Config::write_bool("2048"sv, ""sv, "evil_ai"sv, evil_ai); - GUI::MessageBox::show(window, "New settings have been saved and will be applied on a new game"sv, "Settings Changed Successfully"sv, GUI::MessageBox::Type::Information); + GUI::MessageBox::show(size_dialog, "New settings have been saved and will be applied on a new game"sv, "Settings Changed Successfully"sv, GUI::MessageBox::Type::Information); return; } - GUI::MessageBox::show(window, "New settings have been set and will be applied on the next game"sv, "Settings Changed Successfully"sv, GUI::MessageBox::Type::Information); + GUI::MessageBox::show(size_dialog, "New settings have been set and will be applied on the next game"sv, "Settings Changed Successfully"sv, GUI::MessageBox::Type::Information); }; auto start_a_new_game = [&] { // Do not leak game states between games. diff --git a/Userland/Games/Hearts/main.cpp b/Userland/Games/Hearts/main.cpp index e6f93edde6..95a818fad1 100644 --- a/Userland/Games/Hearts/main.cpp +++ b/Userland/Games/Hearts/main.cpp @@ -84,7 +84,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) Config::write_string("Hearts"sv, ""sv, "player_name"sv, player_name); - GUI::MessageBox::show(window, "Settings have been successfully saved and will take effect in the next game."sv, "Settings Changed Successfully"sv, GUI::MessageBox::Type::Information); + GUI::MessageBox::show(settings_dialog, "Settings have been successfully saved and will take effect in the next game."sv, "Settings Changed Successfully"sv, GUI::MessageBox::Type::Information); }; auto game_menu = TRY(window->try_add_menu("&Game")); |