Andreas Kling
687a12d7fb
Userland: Add GUI::Window::add_menu() and use it everywhere
...
Applications previously had to create a GUI::Menubar object, add menus
to it, and then call GUI::Window::set_menubar().
This patch introduces GUI::Window::add_menu() which creates the menubar
automatically and adds items to it. Application code becomes slightly
simpler as a result. :^)
2021-07-21 21:24:26 +02:00
Andreas Kling
c7d891765c
LibGfx: Use "try_" prefix for static factory functions
...
Also mark them as [[nodiscard]].
2021-07-21 18:02:15 +02:00
networkException
39a3f42534
GameOfLife: Properly switch between play and pause icon
...
The play and pause icon were previously set on the toggle Action
and not on the Button of the Action that is part of the Toolbar
2021-07-07 15:29:37 +01:00
Gunnar Beutner
631d36fd98
Everywhere: Add component declarations
...
This adds component declarations so that users can select to not build
certain parts of the OS.
2021-06-17 11:03:51 +02:00
Ryan Wilson
1965d60aeb
GameOfLife: Add choosable patterns
2021-05-22 09:54:58 +01:00
Linus Groh
d7c0370c57
GameOfLife: Don't randomize cells on board resize
...
Loosing all game state for a simple resize of the board is quite
disappointing, so let's not do that. :^)
2021-05-16 23:00:21 +02:00
Linus Groh
7dea3d41cb
GameOfLife: Use a frame as the board widget container
...
This adds a bit of depth and looks very nice :^)
2021-05-16 23:00:21 +02:00
Linus Groh
9151364e22
GameOfLife: Add vertical separator between interval and action buttons
2021-05-16 23:00:21 +02:00
Linus Groh
d859bde337
GameOfLife: Move "ms" interval label to GML
...
There's no reason not to!
2021-05-16 23:00:21 +02:00
Linus Groh
e7dc0bdba3
GameOfLife: Auto-size toolbar labels
2021-05-16 23:00:21 +02:00
Linus Groh
9a3f62adc7
GameOfLife: Remove some unused includes
2021-05-16 23:00:21 +02:00
Linus Groh
030360c787
GameOfLife: Add some margin to the toolbar layout
...
Ideally the inner widgets / vertical separators would have some as well,
but I'm not sure how right now. One step at a time. :^)
2021-05-16 23:00:21 +02:00
Linus Groh
f89eb0e4ce
GameOfLife: Switch from single indexed vector to rows+columns
...
This is not only easier to comprehend code-wise and avoids some function
overloads, but also makes resizing the board while preserving game state
*a lot* easier. We now no longer have to allocate a new board on every
resize, we just grow/shrink the individual row vectors.
Also fixes a crash when clicking the board widget outside of the drawn
board area.
2021-05-16 23:00:21 +02:00
Linus Groh
0fb96e6cbf
GameOfLife: Spell about action app name as "Game Of Life"
2021-05-15 17:55:49 +01:00
Linus Groh
9f9f54a9ad
GameOfLife: Add separator before quit menu action
2021-05-15 17:55:27 +01:00
Linus Groh
310ec73550
GameOfLife: Add alt shortcuts to menus
2021-05-15 17:54:50 +01:00
Linus Groh
2225e18749
GameOfLife: Rename primary menu to just "Game"
2021-05-15 17:52:58 +01:00
Andres Crucitti
d99991e39c
Games: Add GameOfLife
...
This patch introduces a new game based on Conway's Game of Life.
2021-05-15 17:44:21 +01:00