mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:47:34 +00:00
Breakout: Add menus before showing the window
Otherwise, space is reserved but menus aren't shown.
This commit is contained in:
parent
7f99497378
commit
4b81b9718d
1 changed files with 2 additions and 1 deletions
|
@ -45,7 +45,6 @@ int main(int argc, char** argv)
|
|||
auto app_icon = GUI::Icon::default_icon("app-breakout");
|
||||
window->set_icon(app_icon.bitmap_for_size(16));
|
||||
auto& game = window->set_main_widget<Breakout::Game>();
|
||||
window->show();
|
||||
|
||||
auto& game_menu = window->add_menu("&Game");
|
||||
game_menu.add_action(GUI::Action::create_checkable("&Pause", { {}, Key_P }, [&](auto& action) {
|
||||
|
@ -61,5 +60,7 @@ int main(int argc, char** argv)
|
|||
auto& help_menu = window->add_menu("&Help");
|
||||
help_menu.add_action(GUI::CommonActions::make_about_action("Breakout", app_icon, window));
|
||||
|
||||
window->show();
|
||||
|
||||
return app->exec();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue