mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:17:44 +00:00
Pong: Add menus before showing the window
Otherwise, space is reserved but menus aren't shown.
This commit is contained in:
parent
64a98d0f90
commit
7f99497378
1 changed files with 2 additions and 1 deletions
|
@ -53,7 +53,6 @@ int main(int argc, char** argv)
|
||||||
window->set_double_buffering_enabled(false);
|
window->set_double_buffering_enabled(false);
|
||||||
window->set_main_widget<Pong::Game>();
|
window->set_main_widget<Pong::Game>();
|
||||||
window->set_resizable(false);
|
window->set_resizable(false);
|
||||||
window->show();
|
|
||||||
|
|
||||||
auto& game_menu = window->add_menu("&Game");
|
auto& game_menu = window->add_menu("&Game");
|
||||||
game_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) {
|
game_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) {
|
||||||
|
@ -63,5 +62,7 @@ int main(int argc, char** argv)
|
||||||
auto& help_menu = window->add_menu("&Help");
|
auto& help_menu = window->add_menu("&Help");
|
||||||
help_menu.add_action(GUI::CommonActions::make_about_action("Pong", app_icon, window));
|
help_menu.add_action(GUI::CommonActions::make_about_action("Pong", app_icon, window));
|
||||||
|
|
||||||
|
window->show();
|
||||||
|
|
||||||
return app->exec();
|
return app->exec();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue