Age | Commit message (Collapse) | Author |
|
This allows for typing [8] instead of [8, 8, 8, 8] to specify the same
margin on all edges, for example. The constructors follow CSS' style of
specifying margins. The added constructors are:
- Margins(int all): Sets the same margin on all edges.
- Margins(int vertical, int horizontal): Sets the first argument to top
and bottom margins, and the second argument to left and right margins.
- Margins(int top, int vertical, int bottom): Sets the first argument to
the top margin, the second argument to the left and right margins,
and the third argument to the bottom margin.
|
|
Previously the argument order for Margins was (left, top, right,
bottom). To make it more familiar and closer to how CSS does it, the
argument order is now (top, right, bottom, left).
|
|
|
|
Cancel was superflous, and provided no difference to No.
|
|
|
|
Fixes #9218.
|
|
Fixes #9217.
|
|
Otherwise, space is reserved but menus aren't shown.
|
|
Otherwise, space is reserved but menus aren't shown.
|
|
You can now choose what statistic (currently only high score or best
time) to display in the statusbar.
|
|
This fixes a bug where the game wouldn't consider it had started.
|
|
Again, this isn't exposed anywhere yet.
|
|
|
|
This isn't exposed in the game anywhere yet.
|
|
This eliminates some code duplication, and will be helpful for future
commits introducing further statistic tracking.
|
|
|
|
This also has the added benefit that after a restart we don't get the
same random numbers all the time because we forgot to initialize the
RNG with srand().
|
|
|
|
|
|
|
|
|
|
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. :^)
|
|
Also mark them as [[nodiscard]].
|
|
The game doesn't handle resize events.
It's a pretty lazy fix. The proper way would be to actually allow
the game to be resized, with some scaling trickery, but most games
here don't do that anyway, so I guess that's good enough.
|
|
AK's version should see better inlining behaviors, than the LibM one.
We avoid mixed usage for now though.
Also clean up some stale math includes and improper floatingpoint usage.
|
|
|
|
|
|
|
|
This matches basically all other Spider implementations I've played,
and makes playing much easier :)
I have left click-to-reveal in place, but mostly incase there is a
condition I've forgotten about.
|
|
|
|
|
|
Drawing the entire PNG background is rather expensive. Instead, only
draw the rects that are updating.
|
|
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
|
|
Scoring is designed to mimic Microsoft's implementation - starting at
500, decreasing by 1 every move, and increasing by 100 for every full
stack.
Fixes GH-5319.
|
|
The crash happens very rarely and is hard to reproduce so it is
hard to know for certain, but I am confident this fixes it.
I previously delayed the start of the game-over animation by one
frame, but neglected to check m_start_game_over_animation_next_frame
wasn't set. This means multiple calls to start_game_over_animation()
on the same frame (or rather, before the first timer_event) would
each call Object::start_timer(). Now that we do check the flag,
that should no longer be possible.
Fixes #8122.
|
|
"High score" should be two words, and this matches other games in the
system.
|
|
Previously, the high score was only in-memory, so only persisted for as
long as the FlappyBug window was open.
|
|
|
|
The PR for this pre-dates the concept of components, so it was forgotten
to add one.
|
|
We now have a nice sunset sky and some random cloud graphics.
The obstacles will get graphics at some point too :)
|
|
This adds some actual graphics to the game, and tweaks the obstacle and
sky colors. Eventually there will be graphics for those elements too.
|
|
This makes sure the player doesn't accidentally start a new game after
they bump into an obstacle.
|
|
Better information is now shown to the player. Instructions are shown
when first loading the program, and any available scores are shown on
the game over screen.
|
|
Previously obstacles were respawning fully on-screen which caused a
discontinuous look. Now they smoothly move into view from off-screen.
|
|
The position of the gap in the obstacle is now randomly generated each
time it spawns. The game is more fun to play now :)
|
|
This introduces a Flappy Bug game. It's pretty simple currently, but is
playable.
|
|
This adds component declarations so that users can select to not build
certain parts of the OS.
|
|
This fixes #7792.
The visual glitches with card corners, and the screen-clear when
opening a menu, were both caused by the widgets having
`fill_with_background_color` set. We need that set most of the time,
so we just disable it for the duration of the game-over animation.
Also resove a FIXME that no longer applies. :^)
|
|
Previously, the timer started if you clicked within the game area,
whether that was on a card or not. Now, we only start when you click
on a card or otherwise attempt a move.
As a bonus, we now immediately update the status bar time indicator
on game start, instead of having to wait until 1 second has elapsed.
|
|
|