1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 11:57:34 +00:00

2048: Move out the 'undo' action to the app menu/action

This commit is contained in:
AnotherTest 2020-08-14 16:20:13 +04:30 committed by Andreas Kling
parent d97025567a
commit 2336c62901
3 changed files with 13 additions and 8 deletions

View file

@ -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();
}));