From 62422eecdceb9015deab203ce302b6e8f450de7f Mon Sep 17 00:00:00 2001 From: Till Mayer Date: Thu, 12 Mar 2020 22:53:37 +0100 Subject: [PATCH] Solitaire: Add about dialog and 32x32 icon --- Base/res/icons/32x32/app-solitaire.png | Bin 0 -> 4694 bytes Games/Solitaire/main.cpp | 8 ++++++++ 2 files changed, 8 insertions(+) create mode 100644 Base/res/icons/32x32/app-solitaire.png diff --git a/Base/res/icons/32x32/app-solitaire.png b/Base/res/icons/32x32/app-solitaire.png new file mode 100644 index 0000000000000000000000000000000000000000..429ea995105cfdbb7e764cf188ce87e70178b39b GIT binary patch literal 4694 zcmV-c5~=NpP)%abcoxRqE{~z}@ zR5dv{IhnDwD7yT*f8D>f7PFqMMJfL?W)%XDKx+M8Sg@!LdmTD-=+L1mX64G2D_MBwcTLO7%gehnud^3pRxKvIT8jY@wdly~bRoS@dY^~0 zl6(m(6IKSdRc{#@8SJ2q(6Y48!90a;MK*-Kt!y%!1Xb1JWqIhHTi43xlzrMEZ`We=`;o!nws4!(@I>ow{k!$Ae>rSt_`~7JP}AMp-xCKxadL@L4hbKc z=3A#h_4LxnvbGJItaa}y&diuOw|1R2#kDx?S30S`T>#s92 ze~$Qw5krTjr~i)#4;uaCF!#_7Ntw6LRD4r)*_N}hVDsor*Q+ll?N0kC?No;WE#FN{ zPE78GFoJj535l!OaVp3ulzWn8bqj&XuJGFK4efPg|t)nw^yWoMZN6>Z8h%Qr*zt;5~28o{l!;(@nc z6}jd=1ic&7i*)NnL!|KpB4Dl7US1J9qZURdMJ?u$`;^8@8a0H}X>AU-ii&&6_)6BvCk)Ds8H)1XumWmo>1|(!AzMQxL8aHSj);tL85#gS2 zlibaA5wElpxn<|d3(G?pd-C9^Cw|I+N@vAG6$;d^j^7f09<1wZR*M( zC?!;VyX5_$aW9PTa>TdtH|K!d;4_6snj~fFGqge4z)AIkZrQs>HA`PvxThl9(=qyT z^4SoR`V;gX*JV}uYOws-ddhknPTtJBnzs+KvyWdq-caNk4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ce35678c19..250f823b3a5 100644 --- a/Games/Solitaire/main.cpp +++ b/Games/Solitaire/main.cpp @@ -25,6 +25,7 @@ */ #include "SolitaireWidget.h" +#include #include #include #include @@ -52,11 +53,18 @@ int main(int argc, char** argv) auto menu_bar = make(); auto app_menu = GUI::Menu::construct("Solitaire"); + auto help_menu = GUI::Menu::construct("Help"); app_menu->add_action(GUI::Action::create("Restart game", [&](auto&) { widget->setup(); })); app_menu->add_separator(); app_menu->add_action(GUI::CommonActions::make_quit_action([&](auto&) { app.quit(); })); + + help_menu->add_action(GUI::Action::create("About", [&](auto&) { + GUI::AboutDialog::show("Solitaire", Gfx::Bitmap::load_from_file("/res/icons/32x32/app-solitaire.png")); + })); + menu_bar->add_menu(move(app_menu)); + menu_bar->add_menu(move(help_menu)); app.set_menubar(move(menu_bar)); window->set_main_widget(widget);