From 1ec0f54de1dae54e061014d4071b52c16df654b8 Mon Sep 17 00:00:00 2001 From: Abu Sakib Date: Mon, 17 Aug 2020 15:55:46 +0600 Subject: [PATCH] Chess: Add Help menuitem --- Games/Chess/main.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Games/Chess/main.cpp b/Games/Chess/main.cpp index cdf257562f..2eb6b811cb 100644 --- a/Games/Chess/main.cpp +++ b/Games/Chess/main.cpp @@ -27,6 +27,7 @@ #include "ChessWidget.h" #include #include +#include #include #include #include @@ -103,7 +104,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();