mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 09:47:34 +00:00
Everywhere: Rename app_menu to file_menu or game_menu
This commit is contained in:
parent
b119fa5a0a
commit
4b0098e52f
34 changed files with 140 additions and 142 deletions
|
@ -49,14 +49,14 @@ int main(int argc, char** argv)
|
|||
|
||||
auto menubar = GUI::Menubar::construct();
|
||||
|
||||
auto& app_menu = menubar->add_menu("Game");
|
||||
app_menu.add_action(GUI::Action::create_checkable("Pause", { {}, Key_P }, [&](auto& action) {
|
||||
auto& game_menu = menubar->add_menu("&Game");
|
||||
game_menu.add_action(GUI::Action::create_checkable("&Pause", { {}, Key_P }, [&](auto& action) {
|
||||
game.set_paused(action.is_checked());
|
||||
}));
|
||||
|
||||
app_menu.add_separator();
|
||||
game_menu.add_separator();
|
||||
|
||||
app_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) {
|
||||
game_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) {
|
||||
GUI::Application::the()->quit();
|
||||
}));
|
||||
|
||||
|
|
|
@ -51,13 +51,13 @@ int main(int argc, char** argv)
|
|||
|
||||
auto menubar = GUI::Menubar::construct();
|
||||
|
||||
auto& app_menu = menubar->add_menu("Game");
|
||||
auto& game_menu = menubar->add_menu("Game");
|
||||
|
||||
app_menu.add_action(GUI::Action::create("Reset", { Mod_None, Key_F2 }, [&](auto&) {
|
||||
game_menu.add_action(GUI::Action::create("Reset", { Mod_None, Key_F2 }, [&](auto&) {
|
||||
game.reset();
|
||||
}));
|
||||
app_menu.add_separator();
|
||||
app_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) {
|
||||
game_menu.add_separator();
|
||||
game_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) {
|
||||
GUI::Application::the()->quit();
|
||||
}));
|
||||
|
||||
|
|
|
@ -86,25 +86,24 @@ int main(int argc, char** argv)
|
|||
|
||||
auto menubar = GUI::Menubar::construct();
|
||||
|
||||
auto& app_menu = menubar->add_menu("Game");
|
||||
auto& game_menu = menubar->add_menu("&Game");
|
||||
|
||||
app_menu.add_action(GUI::Action::create("New game", { Mod_None, Key_F2 }, [&](auto&) {
|
||||
game_menu.add_action(GUI::Action::create("&New Game", { Mod_None, Key_F2 }, [&](auto&) {
|
||||
field.reset();
|
||||
}));
|
||||
|
||||
app_menu.add_separator();
|
||||
game_menu.add_separator();
|
||||
|
||||
auto chord_toggler_action = GUI::Action::create_checkable("Single-click chording", [&](auto& action) {
|
||||
field.set_single_chording(action.is_checked());
|
||||
});
|
||||
chord_toggler_action->set_checked(field.is_single_chording());
|
||||
|
||||
app_menu.add_action(*chord_toggler_action);
|
||||
app_menu.add_separator();
|
||||
game_menu.add_action(*chord_toggler_action);
|
||||
game_menu.add_separator();
|
||||
|
||||
app_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) {
|
||||
game_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) {
|
||||
GUI::Application::the()->quit();
|
||||
return;
|
||||
}));
|
||||
|
||||
auto& difficulty_menu = menubar->add_menu("Difficulty");
|
||||
|
|
|
@ -56,8 +56,8 @@ int main(int argc, char** argv)
|
|||
|
||||
auto menubar = GUI::Menubar::construct();
|
||||
|
||||
auto& app_menu = menubar->add_menu("&Game");
|
||||
app_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) {
|
||||
auto& game_menu = menubar->add_menu("&Game");
|
||||
game_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) {
|
||||
GUI::Application::the()->quit();
|
||||
}));
|
||||
|
||||
|
|
|
@ -60,13 +60,13 @@ int main(int argc, char** argv)
|
|||
|
||||
auto menubar = GUI::Menubar::construct();
|
||||
|
||||
auto& app_menu = menubar->add_menu("Game");
|
||||
auto& game_menu = menubar->add_menu("&Game");
|
||||
|
||||
app_menu.add_action(GUI::Action::create("New game", { Mod_None, Key_F2 }, [&](auto&) {
|
||||
game_menu.add_action(GUI::Action::create("&New Game", { Mod_None, Key_F2 }, [&](auto&) {
|
||||
game.reset();
|
||||
}));
|
||||
app_menu.add_separator();
|
||||
app_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) {
|
||||
game_menu.add_separator();
|
||||
game_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) {
|
||||
GUI::Application::the()->quit();
|
||||
}));
|
||||
|
||||
|
|
|
@ -44,13 +44,13 @@ int main(int argc, char** argv)
|
|||
});
|
||||
|
||||
auto menubar = GUI::Menubar::construct();
|
||||
auto& app_menu = menubar->add_menu("Game");
|
||||
auto& game_menu = menubar->add_menu("&Game");
|
||||
|
||||
app_menu.add_action(GUI::Action::create("New game", { Mod_None, Key_F2 }, [&](auto&) {
|
||||
game_menu.add_action(GUI::Action::create("&New Game", { Mod_None, Key_F2 }, [&](auto&) {
|
||||
widget->setup();
|
||||
}));
|
||||
app_menu.add_separator();
|
||||
app_menu.add_action(GUI::CommonActions::make_quit_action([&](auto&) { app->quit(); }));
|
||||
game_menu.add_separator();
|
||||
game_menu.add_action(GUI::CommonActions::make_quit_action([&](auto&) { app->quit(); }));
|
||||
|
||||
auto& help_menu = menubar->add_menu("Help");
|
||||
help_menu.add_action(GUI::CommonActions::make_about_action("Solitaire", app_icon, window));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue