diff options
author | Linus Groh <mail@linusgroh.de> | 2022-03-17 23:19:56 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-03-18 01:10:16 +0100 |
commit | fd60c9fac7150412092f465fb08d3e50bfd0f551 (patch) | |
tree | 96dd4597f375f33d26f3057e5972d5fd3e13d3b5 | |
parent | c2d11d5aa0d8f7830afde9d1ec379862203f69f6 (diff) | |
download | serenity-fd60c9fac7150412092f465fb08d3e50bfd0f551.zip |
Games: Add reload icon to 'New Game' actions
-rw-r--r-- | Userland/Games/Chess/main.cpp | 2 | ||||
-rw-r--r-- | Userland/Games/Hearts/main.cpp | 2 | ||||
-rw-r--r-- | Userland/Games/Minesweeper/main.cpp | 2 | ||||
-rw-r--r-- | Userland/Games/Snake/main.cpp | 2 | ||||
-rw-r--r-- | Userland/Games/Solitaire/main.cpp | 2 | ||||
-rw-r--r-- | Userland/Games/Spider/main.cpp | 2 |
6 files changed, 6 insertions, 6 deletions
diff --git a/Userland/Games/Chess/main.cpp b/Userland/Games/Chess/main.cpp index 837ac5f761..dad764ee45 100644 --- a/Userland/Games/Chess/main.cpp +++ b/Userland/Games/Chess/main.cpp @@ -100,7 +100,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) }))); TRY(game_menu->try_add_separator()); - TRY(game_menu->try_add_action(GUI::Action::create("&New Game", { Mod_None, Key_F2 }, [&](auto&) { + TRY(game_menu->try_add_action(GUI::Action::create("&New Game", { Mod_None, Key_F2 }, TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/reload.png")), [&](auto&) { if (widget->board().game_result() == Chess::Board::Result::NotFinished) { if (widget->resign() < 0) return; diff --git a/Userland/Games/Hearts/main.cpp b/Userland/Games/Hearts/main.cpp index c09c8e7cdd..cd2327215a 100644 --- a/Userland/Games/Hearts/main.cpp +++ b/Userland/Games/Hearts/main.cpp @@ -87,7 +87,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) auto game_menu = TRY(window->try_add_menu("&Game")); - TRY(game_menu->try_add_action(GUI::Action::create("&New Game", { Mod_None, Key_F2 }, [&](auto&) { + TRY(game_menu->try_add_action(GUI::Action::create("&New Game", { Mod_None, Key_F2 }, TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/reload.png")), [&](auto&) { game.setup(player_name); }))); TRY(game_menu->try_add_separator()); diff --git a/Userland/Games/Minesweeper/main.cpp b/Userland/Games/Minesweeper/main.cpp index 98ae965bcd..94a90595fd 100644 --- a/Userland/Games/Minesweeper/main.cpp +++ b/Userland/Games/Minesweeper/main.cpp @@ -96,7 +96,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) auto game_menu = TRY(window->try_add_menu("&Game")); - TRY(game_menu->try_add_action(GUI::Action::create("&New Game", { Mod_None, Key_F2 }, [&](auto&) { + TRY(game_menu->try_add_action(GUI::Action::create("&New Game", { Mod_None, Key_F2 }, TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/reload.png")), [&](auto&) { field->reset(); }))); diff --git a/Userland/Games/Snake/main.cpp b/Userland/Games/Snake/main.cpp index 72654e50a2..fdd30078ab 100644 --- a/Userland/Games/Snake/main.cpp +++ b/Userland/Games/Snake/main.cpp @@ -49,7 +49,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) auto game_menu = TRY(window->try_add_menu("&Game")); - TRY(game_menu->try_add_action(GUI::Action::create("&New Game", { Mod_None, Key_F2 }, [&](auto&) { + TRY(game_menu->try_add_action(GUI::Action::create("&New Game", { Mod_None, Key_F2 }, TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/reload.png")), [&](auto&) { game->reset(); }))); TRY(game_menu->try_add_separator()); diff --git a/Userland/Games/Solitaire/main.cpp b/Userland/Games/Solitaire/main.cpp index 69e5ea52b6..2b70ce9e76 100644 --- a/Userland/Games/Solitaire/main.cpp +++ b/Userland/Games/Solitaire/main.cpp @@ -185,7 +185,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) auto game_menu = TRY(window->try_add_menu("&Game")); - TRY(game_menu->try_add_action(GUI::Action::create("&New Game", { Mod_None, Key_F2 }, [&](auto&) { + TRY(game_menu->try_add_action(GUI::Action::create("&New Game", { Mod_None, Key_F2 }, TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/reload.png")), [&](auto&) { game.setup(mode); }))); TRY(game_menu->try_add_separator()); diff --git a/Userland/Games/Spider/main.cpp b/Userland/Games/Spider/main.cpp index b54ed37822..a4e2537979 100644 --- a/Userland/Games/Spider/main.cpp +++ b/Userland/Games/Spider/main.cpp @@ -233,7 +233,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) suit_actions.add_action(two_suit_action); auto game_menu = TRY(window->try_add_menu("&Game")); - TRY(game_menu->try_add_action(GUI::Action::create("&New Game", { Mod_None, Key_F2 }, [&](auto&) { + TRY(game_menu->try_add_action(GUI::Action::create("&New Game", { Mod_None, Key_F2 }, TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/reload.png")), [&](auto&) { game.setup(mode); }))); TRY(game_menu->try_add_separator()); |