Skip to content

Commit

Permalink
Games: Add missing separators to the application menus
Browse files Browse the repository at this point in the history
  • Loading branch information
xTibor authored and awesomekling committed Aug 17, 2020
1 parent a27d782 commit e3d1ea3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions Games/2048/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ int main(int argc, char** argv)
app_menu.add_action(GUI::CommonActions::make_undo_action([&](auto&) {
game.undo();
}));
app_menu.add_separator();
app_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) {
GUI::Application::the()->quit();
}));
Expand Down
5 changes: 3 additions & 2 deletions Games/Chess/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ int main(int argc, char** argv)
app_menu.add_action(GUI::Action::create("New game", { Mod_None, Key_F2 }, [&](auto&) {
widget.reset();
}));
app_menu.add_separator();
app_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) {
GUI::Application::the()->quit();
}));
Expand Down Expand Up @@ -104,12 +105,12 @@ int main(int argc, char** argv)
action->set_checked(true);
board_theme_menu.add_action(*action);
}

auto& help_menu = menubar->add_menu("Help");
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);
}));

app->set_menubar(move(menubar));

window->show();
Expand Down
1 change: 1 addition & 0 deletions Games/Snake/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ 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_separator();
app_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) {
GUI::Application::the()->quit();
}));
Expand Down

0 comments on commit e3d1ea3

Please sign in to comment.