mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-13 01:59:14 +03:00
Snake: Merge "Game" menu into the app menu
This commit is contained in:
parent
9a80554943
commit
227bfd79d3
Notes:
sideshowbarker
2024-07-19 12:29:48 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/227bfd79d3d
@ -24,17 +24,15 @@ int main(int argc, char** argv)
|
||||
auto menubar = make<GMenuBar>();
|
||||
|
||||
auto app_menu = make<GMenu>("Snake");
|
||||
app_menu->add_action(GAction::create("Quit", { Mod_Alt, Key_F4 }, [](const GAction&) {
|
||||
GApplication::the().quit(0);
|
||||
return;
|
||||
}));
|
||||
menubar->add_menu(move(app_menu));
|
||||
|
||||
auto game_menu = make<GMenu>("Game");
|
||||
game_menu->add_action(GAction::create("New game", { Mod_None, Key_F2 }, [&](const GAction&) {
|
||||
app_menu->add_action(GAction::create("New game", { Mod_None, Key_F2 }, [&](const GAction&) {
|
||||
game->reset();
|
||||
}));
|
||||
menubar->add_menu(move(game_menu));
|
||||
app_menu->add_action(GAction::create("Quit", { Mod_Alt, Key_F4 }, [](const GAction&) {
|
||||
GApplication::the().quit(0);
|
||||
}));
|
||||
|
||||
menubar->add_menu(move(app_menu));
|
||||
|
||||
auto help_menu = make<GMenu>("Help");
|
||||
help_menu->add_action(GAction::create("About", [](const GAction&) {
|
||||
|
Loading…
Reference in New Issue
Block a user