mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 02:37:35 +00:00
Games: Add missing separators to the application menus
This commit is contained in:
parent
a27d782dd6
commit
e3d1ea34ff
3 changed files with 5 additions and 2 deletions
|
@ -78,6 +78,7 @@ int main(int argc, char** argv)
|
||||||
app_menu.add_action(GUI::CommonActions::make_undo_action([&](auto&) {
|
app_menu.add_action(GUI::CommonActions::make_undo_action([&](auto&) {
|
||||||
game.undo();
|
game.undo();
|
||||||
}));
|
}));
|
||||||
|
app_menu.add_separator();
|
||||||
app_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) {
|
app_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) {
|
||||||
GUI::Application::the()->quit();
|
GUI::Application::the()->quit();
|
||||||
}));
|
}));
|
||||||
|
|
|
@ -61,6 +61,7 @@ int main(int argc, char** argv)
|
||||||
app_menu.add_action(GUI::Action::create("New game", { Mod_None, Key_F2 }, [&](auto&) {
|
app_menu.add_action(GUI::Action::create("New game", { Mod_None, Key_F2 }, [&](auto&) {
|
||||||
widget.reset();
|
widget.reset();
|
||||||
}));
|
}));
|
||||||
|
app_menu.add_separator();
|
||||||
app_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) {
|
app_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) {
|
||||||
GUI::Application::the()->quit();
|
GUI::Application::the()->quit();
|
||||||
}));
|
}));
|
||||||
|
@ -104,12 +105,12 @@ int main(int argc, char** argv)
|
||||||
action->set_checked(true);
|
action->set_checked(true);
|
||||||
board_theme_menu.add_action(*action);
|
board_theme_menu.add_action(*action);
|
||||||
}
|
}
|
||||||
|
|
||||||
auto& help_menu = menubar->add_menu("Help");
|
auto& help_menu = menubar->add_menu("Help");
|
||||||
help_menu.add_action(GUI::Action::create("About", [&](auto&) {
|
help_menu.add_action(GUI::Action::create("About", [&](auto&) {
|
||||||
GUI::AboutDialog::show("Chess", Gfx::Bitmap::load_from_file("/res/icons/32x32/app-chess.png"), window);
|
GUI::AboutDialog::show("Chess", Gfx::Bitmap::load_from_file("/res/icons/32x32/app-chess.png"), window);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
app->set_menubar(move(menubar));
|
app->set_menubar(move(menubar));
|
||||||
|
|
||||||
window->show();
|
window->show();
|
||||||
|
|
|
@ -64,6 +64,7 @@ int main(int argc, char** argv)
|
||||||
app_menu.add_action(GUI::Action::create("New game", { Mod_None, Key_F2 }, [&](auto&) {
|
app_menu.add_action(GUI::Action::create("New game", { Mod_None, Key_F2 }, [&](auto&) {
|
||||||
game.reset();
|
game.reset();
|
||||||
}));
|
}));
|
||||||
|
app_menu.add_separator();
|
||||||
app_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) {
|
app_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) {
|
||||||
GUI::Application::the()->quit();
|
GUI::Application::the()->quit();
|
||||||
}));
|
}));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue