mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:27:46 +00:00
GameOfLife: Focus on the game board when not editing settings
This makes single key shortcuts work again :^)
This commit is contained in:
parent
649c7ee11f
commit
f25f2ba047
1 changed files with 2 additions and 0 deletions
|
@ -63,6 +63,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
auto& board_widget_container = *main_widget->find_descendant_of_type_named<GUI::Widget>("board_widget_container");
|
||||
board_widget_container.set_layout<GUI::VerticalBoxLayout>(GUI::Margins {}, 0);
|
||||
auto& board_widget = board_widget_container.add<BoardWidget>(board_rows, board_columns);
|
||||
board_widget.set_focus_policy(GUI::FocusPolicy::StrongFocus);
|
||||
board_widget.set_focus(true);
|
||||
board_widget.randomize_cells();
|
||||
board_widget.set_min_size(board_columns, board_rows);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue