mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
2048: Alt shortcuts and book title capitalization in menus
This commit is contained in:
parent
858ba11aef
commit
8529053ffe
Notes:
sideshowbarker
2024-07-18 20:22:09 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/8529053ffe3
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& 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();
|
||||
}));
|
||||
|
||||
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())
|
||||
return;
|
||||
game = undo_stack.take_last();
|
||||
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();
|
||||
}));
|
||||
|
||||
app_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) {
|
||||
game_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) {
|
||||
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));
|
||||
|
||||
window->set_menubar(move(menubar));
|
||||
|
|
Loading…
Reference in a new issue