diff options
author | AnotherTest <ali.mpfard@gmail.com> | 2020-08-14 16:20:13 +0430 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-08-14 15:10:31 +0200 |
commit | 2336c6290188df573ac2a90cb9fde29d0a5d80b0 (patch) | |
tree | 981de9b639335b3760fc773bc2b2f7d3f3ebbfff /Games/2048/main.cpp | |
parent | d97025567a0b4e8b423c41b9af7f2eab7a260d52 (diff) | |
download | serenity-2336c6290188df573ac2a90cb9fde29d0a5d80b0.zip |
2048: Move out the 'undo' action to the app menu/action
Diffstat (limited to 'Games/2048/main.cpp')
-rw-r--r-- | Games/2048/main.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Games/2048/main.cpp b/Games/2048/main.cpp index 085f397648..6e4c9a52ba 100644 --- a/Games/2048/main.cpp +++ b/Games/2048/main.cpp @@ -75,6 +75,9 @@ int main(int argc, char** argv) app_menu.add_action(GUI::Action::create("New game", { Mod_None, Key_F2 }, [&](auto&) { game.reset(); })); + app_menu.add_action(GUI::CommonActions::make_undo_action([&](auto&) { + game.undo(); + })); app_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) { GUI::Application::the()->quit(); })); |