mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 17:57:35 +00:00
2048: Alt shortcuts and book title capitalization in menus
This commit is contained in:
parent
858ba11aef
commit
8529053ffe
1 changed files with 7 additions and 7 deletions
|
@ -180,30 +180,30 @@ int main(int argc, char** argv)
|
||||||
|
|
||||||
auto menubar = GUI::Menubar::construct();
|
auto menubar = GUI::Menubar::construct();
|
||||||
|
|
||||||
auto& app_menu = menubar->add_menu("File");
|
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&) {
|
||||||
start_a_new_game();
|
start_a_new_game();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
app_menu.add_action(GUI::CommonActions::make_undo_action([&](auto&) {
|
game_menu.add_action(GUI::CommonActions::make_undo_action([&](auto&) {
|
||||||
if (undo_stack.is_empty())
|
if (undo_stack.is_empty())
|
||||||
return;
|
return;
|
||||||
game = undo_stack.take_last();
|
game = undo_stack.take_last();
|
||||||
update();
|
update();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
app_menu.add_separator();
|
game_menu.add_separator();
|
||||||
|
|
||||||
app_menu.add_action(GUI::Action::create("Settings", [&](auto&) {
|
game_menu.add_action(GUI::Action::create("&Settings...", [&](auto&) {
|
||||||
change_settings();
|
change_settings();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
app_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) {
|
game_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) {
|
||||||
GUI::Application::the()->quit();
|
GUI::Application::the()->quit();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
auto& help_menu = menubar->add_menu("Help");
|
auto& help_menu = menubar->add_menu("&Help");
|
||||||
help_menu.add_action(GUI::CommonActions::make_about_action("2048", app_icon, window));
|
help_menu.add_action(GUI::CommonActions::make_about_action("2048", app_icon, window));
|
||||||
|
|
||||||
window->set_menubar(move(menubar));
|
window->set_menubar(move(menubar));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue