1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 18:07:35 +00:00

Userland: Turn all application menus into window menus :^)

This commit is contained in:
Andreas Kling 2021-03-25 21:41:39 +01:00
parent fcc8e3484f
commit 78b12e1521
47 changed files with 100 additions and 110 deletions

View file

@ -69,23 +69,21 @@ int main(int argc, char** argv)
auto menubar = GUI::MenuBar::construct();
auto& app_menu = menubar->add_menu("Breakout");
auto& app_menu = menubar->add_menu("Game");
app_menu.add_action(GUI::Action::create_checkable("Pause", { {}, Key_P }, [&](auto& action) {
game.set_paused(action.is_checked());
return;
}));
app_menu.add_separator();
app_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) {
GUI::Application::the()->quit();
return;
}));
auto& help_menu = menubar->add_menu("Help");
help_menu.add_action(GUI::CommonActions::make_about_action("Breakout", app_icon, window));
app->set_menubar(move(menubar));
window->set_menubar(move(menubar));
return app->exec();
}