Commit Graph

614 Commits

Author SHA1 Message Date
Hugh Davenport
8740a8c056 FlappyBug: Allow shortcuts for quitting and help
As the menus show that ALT-F4 quit and F1 brings up help, we should
make the application do that instead of just undocumented ESC
2024-02-19 00:09:34 +01:00
Jakub Pyszczak
ac49617183 2048: Ensure that correct font is requested
Previously, during the start of the game BoardView component tried to
get the font from the database passing empty string as a parameter.
It caused a debug message informing user that the lookup failed.
2024-02-18 21:34:38 +01:00
Sam Atkins
c9fb3e07d2 BrickGame: Make action shortcuts work when the game is paused
We previously never called event.ignore(), so the keydown event for F2
or F11 etc would be consumed by the BrickGame widget instead of
bubbling up. Now you can start a new game, or escape fullscreen mode,
even if you've paused the game. :^)
2024-02-11 21:13:06 +00:00
Sam Atkins
7e8cfb60eb AK+Userland: Return String from human_readable_[digital_]time() 2024-01-25 09:07:32 +01:00
Hugh Davenport
7dba28fce8 MasterWord: Add fullscreen option
Required allowing resizing. Perhaps an additional setting to allow
fullscreen, but not resizing? Anyhow, the game still plays well if
you can resize and works as expected.
2024-01-14 15:18:43 -07:00
Hugh Davenport
64edf6913f Games: Add fullscreen option 2024-01-14 15:18:43 -07:00
Sam Atkins
4ed5287792 Solitaire: Hide solve button when game ends
`on_game_start` is not called until the player makes a move, so waiting
until then means that the solve button would still be visible when
starting a new game after completing one. By hiding the button in
`on_game_end`, this happens when the game-over animation starts playing
instead.
2024-01-12 17:16:19 -07:00
Sanil
343d6b001f Hearts: Port to GML compiler 2024-01-09 17:23:39 +01:00
Ali Mohammad Pur
5e1499d104 Everywhere: Rename {Deprecated => Byte}String
This commit un-deprecates DeprecatedString, and repurposes it as a byte
string.
As the null state has already been removed, there are no other
particularly hairy blockers in repurposing this type as a byte string
(what it _really_ is).

This commit is auto-generated:
  $ xs=$(ack -l \bDeprecatedString\b\|deprecated_string AK Userland \
    Meta Ports Ladybird Tests Kernel)
  $ perl -pie 's/\bDeprecatedString\b/ByteString/g;
    s/deprecated_string/byte_string/g' $xs
  $ clang-format --style=file -i \
    $(git diff --name-only | grep \.cpp\|\.h)
  $ gn format $(git ls-files '*.gn' '*.gni')
2023-12-17 18:25:10 +03:30
david072
6a4e3d9002 Solitaire: Ability to automatically solve the end of the game
In Solitaire, when the stock stack is empty and all cards have been
revealed, finishing the game is trivial, since you only need to sort the
already visible cards onto the foundation stacks. To simplify this, the
game will now give you the option to finish the game automatically if
these conditions are met. It then sorts the cards with a delay of 100ms
between each card.
2023-12-10 00:02:32 +01:00
Brandon Woodford
cdbc2a0dcd Snake: Use new GML compiler 2023-12-07 02:39:20 +01:00
david072
bac7c057e9 Spider: Make non-movable cards disabled :^)
In Spider, cards that can't be moved are now shown as disabled using the
helpers in LibCards. This makes it much easier to see what can be moved
and to where, overall improving the game significantly!
2023-11-24 11:45:32 +00:00
david072
65b9cb63ee Spider: Port to the GML compiler 2023-11-24 11:45:32 +00:00
Tim Schumacher
a2f60911fe AK: Rename GenericTraits to DefaultTraits
This feels like a more fitting name for something that provides the
default values for Traits.
2023-11-09 10:05:51 -05:00
Strawby
387decbb01 Spider: Add Manual link to the help-context-menu 2023-11-08 16:26:23 +00:00
Sam Atkins
0875ef770f Chess: Make chess widget resilient to missing piece images
Display a warning when some images are missing, instead of crashing.

Also, don't keep old images around when loading a new set, and make use
of get_piece_graphic() more often.
2023-11-07 19:44:11 +01:00
0GreenClover0
88cc019275 FlappyBug: Unify the way of getting the final score
Previously we would display the score rounded to the nearest integer,
but save the high score by using a static_cast<u32>, which would
always round the score down. This could lead to the final score being
higher than the new high score, when they should be equal.
Now we always round the score to the nearest integer.
2023-11-01 10:43:55 +01:00
Andrew Kaster
1567332e34 Userland+Tests: Remove uses of direct file loading for BitmapFont
Route them through Core::Resource APIs instead.
2023-10-29 13:12:28 -06:00
tetektoza
4db9996cc0 Minesweeper: Port to GML compilation
This patch ports minesweeper to GML compilation,
and introduces a few changes made to associated files.
2023-10-24 21:47:18 +02:00
hanaa12G
10428fc7ce Solitaire: Port to GML compilation 2023-10-23 16:13:05 +01:00
Tim Ledbetter
881581820f GameOfLife: Allow pressing escape to clear the selected pattern 2023-10-07 11:36:57 +02:00
Tim Ledbetter
f25f2ba047 GameOfLife: Focus on the game board when not editing settings
This makes single key shortcuts work again :^)
2023-10-07 11:36:57 +02:00
Tim Ledbetter
649c7ee11f GameOfLife: Use the GML compiler 2023-10-07 11:36:57 +02:00
Sam Atkins
b53a633388 Hearts: Paint player names in white when background is a dark color 2023-10-04 20:10:04 +02:00
toadkarter
4e2e2027c3 MasterWord: Use GML compiler 2023-10-02 21:31:06 +02:00
Tim Ledbetter
12adaac08d GameOfLife: Don't toggle cells on mouse move when placing patterns
Previously, it was very easy to inadvertently toggle cells when
placing a pattern by dragging the mouse slightly.
2023-09-27 19:12:14 +02:00
Tim Ledbetter
6eaae726fa GameOfLife: Clear the selected pattern when the game starts running 2023-09-27 19:12:14 +02:00
Tim Ledbetter
4b48757586 GameOfLife: Allow ctrl+click to place multiple patterns 2023-09-27 19:12:14 +02:00
Tim Ledbetter
b4e134cb52 Userland: Use non-fallible EventReceiver::add() where possible 2023-09-25 10:58:31 +02:00
Tim Ledbetter
3aa49f268c Userland: Make Window::set_main_widget() non-fallible 2023-09-21 10:20:23 +02:00
Tim Ledbetter
9cd3477763 GameOfLife: Replace DeprecatedString with String 2023-09-18 11:12:25 -06:00
Tim Ledbetter
a6f6a1afd2 Userland: Prefer non-fallible construction for LibGUI objects 2023-09-18 18:00:45 +02:00
Cubic Love
2767fa78f8 Solitaire: Rearrange Help Menu
Rearrange the Help menu actions so they're in the same order as other
application's Help menus.
2023-09-17 17:26:32 -06:00
Tim Ledbetter
19dfdeeaec GameOfLife: Add a tick counter to the status bar
The counter is incremented after each new generation and reset
whenever any cell on the board is toggled. Resizing the board
does not reset the tick count.
2023-09-17 16:51:58 -06:00
Tim Ledbetter
0d7b13edac Userland: Make GUI::Window construction non-fallible 2023-09-17 16:47:28 -06:00
Tim Ledbetter
3c9dee5d5a GameOfLife: Use the same play/pause action in the menu and toolbar
This prevents the menu and toolbar action state getting out of sync,
which could happen previously. The menu item also now shows the
appropriate icon rather than a checkbox.
2023-09-16 11:06:33 +02:00
Tim Ledbetter
ccab5ddf9b LibGUI+Applications: Use String in make_about_action() 2023-09-16 11:05:49 +02:00
Tim Ledbetter
9a6927c575 GameOfLife: Ensure BoardWidget can always contain the board
Previously, when there were more rows or columns than the BoardWidget
could contain, nothing was displayed. The BoardWidget minimum size is
now set whenever the number of rows or columns changes.
2023-09-13 07:45:49 +01:00
Tim Ledbetter
871f5ba431 2048: Disable the undo and redo actions when unavailable
This change also ensures that the redo stack is cleared when a move is
made, so that it isn't possible to redo a previous move after having
made a new one.
2023-09-13 07:27:01 +02:00
Bastiaan van der Plaat
494a8cb816 AK: Add to_radians and to_degrees math functions 2023-09-10 08:38:29 +01:00
Reza
ffc0046d74 Snake: Replace DeprecatedString with String 2023-09-09 10:50:03 -06:00
Andreas Kling
545d8336b8 LibGfx: Convert Font APIs to return String instead of DeprecatedString 2023-09-06 11:29:03 -04:00
Cubic Love
91269a8064 Chess: Capitalize chess set names + Rename 'stelar7' to 'Classic'
Now when selecting a chess set in Games Settings, the names of the sets
are capitalized which looks much neater.

The default set 'stelar7' has been renamed to 'Classic' to reflect its
default vanilla design, as opposed to more stylized sets.
This commit also updates any code references to this set.
2023-08-29 10:28:24 +02:00
implicitfield
2114c27656 Flood: Replace usage of DeprecatedString 2023-08-23 13:28:07 +02:00
implicitfield
adaf4a9ed5 Flood: Use the new GML compiler 2023-08-23 13:28:07 +02:00
implicitfield
8434b3a0c6 Flood: Propagate errors when creating SettingsDialog 2023-08-23 13:28:07 +02:00
thankyouverycool
57f3b18109 LibGUI+Userland: Remove Toolbar::try_add_{action,separator}()
These calls largely occur during initialization before there's
unsaved state worth preserving
2023-08-15 15:56:34 +02:00
Andreas Kling
bd61e75e0b LibGUI: Remove Window::try_add_menu()
And fall back to the infallible add_menu().
2023-08-14 14:57:54 +02:00
Andreas Kling
f2faf2767f LibGUI: Remove Menu::try_add_action()
And fall back to the infallible add_action().
2023-08-14 14:57:54 +02:00
Andreas Kling
eec328e2ab LibGUI: Remove Menu::try_add_submenu()
And fall back to the infallible add_submenu().
2023-08-14 14:57:54 +02:00