Jamie Mansfield
926c16f0ce
Spider: Fix crash when completing a deck
...
This resolves a regression caused by
8a48246ed1
.
2023-04-21 10:59:32 +01:00
Tim Ledbetter
8b6c538f2a
Chess: Gracefully handle ChessEngine disconnections
...
The GUI now tracks when it becomes disconnected from ChessEngine.
If not currently waiting for a move from ChessEngine, it will
automatically reconnect on the next engine move. If a disconnection
occurs while waiting for a move, the player is asked whether they
want to try again or not.
2023-04-20 09:59:18 +01:00
Tim Ledbetter
bf320e4826
Chess: Send a quit command to ChessEngine when it is no longer in use
...
The chess GUI now instructs the ChessEngine to gracefully exit by
sending a UCI quit command.
2023-04-20 09:59:18 +01:00
Karol Kosek
51bd9ca037
LibGUI+Userland: Make Menu::*add_submmenu take name using new string
2023-04-19 07:59:54 +02:00
Karol Kosek
969543a847
LibGUI+Userland: Make Window::*add_menu take name using new string
2023-04-19 07:59:54 +02:00
thankyouverycool
a55d2be147
MasterWord: Use numeric InputBox for settings
...
And use proper ellipses and capitalization in related action text.
2023-04-18 10:05:21 +02:00
thankyouverycool
02a9e5d3f6
LibGUI+Userland: Improve error and font handling for InputBox
...
Adds fallible factories, ports DeprecatedString, and rebuilds the
layout to accomodate system font changes.
2023-04-18 10:05:21 +02:00
thankyouverycool
5bb9af8297
Minesweeper: Simplify resizing game window
...
Instead of propagating field size changes to main and manually
calculating window size, use auto shrink to automatically
resize the window after changes to the board.
2023-04-17 20:31:12 +02:00
thankyouverycool
76d17e6a8e
MasterWord: Rectify resizing game window
...
Previously resizing the window did not take into account the
height of the status bar. The board now fixes its size on reset
and allows the Window to auto shrink to the perfect dimensions.
2023-04-17 20:31:12 +02:00
thankyouverycool
b8d88f33cf
MasterWord: Set icon before showing window
2023-04-17 20:31:12 +02:00
thankyouverycool
55423b4ed0
LibGfx+Userland: Add width_rounded_up() helper
2023-04-15 15:24:50 +02:00
Ben Wiederhake
560133a0c6
Everywhere: Remove unused DeprecatedString includes
2023-04-09 22:00:54 +02:00
Karol Baraniecki
f532f9d279
BrickGame: Remember the "Show Shadow Piece" setting between executions
...
by using the ConfigServer.
2023-04-09 00:44:45 +02:00
Karol Baraniecki
439076df8a
BrickGame: Add a menu option to disable the shadow drop hint
2023-04-09 00:44:45 +02:00
Karol Baraniecki
f3f14a7ef1
BrickGame: Show where a piece would end up when after a fast drop
...
To show it to the player, draw a faint outline of where the piece would
end up.
2023-04-09 00:44:45 +02:00
Karol Baraniecki
652a19b232
BrickGame: Use title case in menu items consistently
...
by fixing the "Toggle pause" option
2023-04-09 00:44:45 +02:00
Karol Baraniecki
bd12a72546
BrickGame: Add a missing [[nodiscard]] for consistency
...
Every other function there returning a RenderRequest has one, so might
as well.
Don't add it to check_and_remove_full_rows(), because it's only used
inside other functions returning a RenderRequest, when it's already
clear a render will happen.
2023-04-09 00:44:45 +02:00
Karol Baraniecki
962d39cc05
BrickGame: Port from DeprecatedStrings to Strings
2023-04-09 00:44:45 +02:00
Cameron Youell
1d24f394c6
Everywhere: Use LibFileSystem
where trivial
2023-03-21 19:03:21 +00:00
Sam Atkins
5708a47157
Snake: Implement image-based skins
...
Co-authored-by: HawDevelopment <hawdevelopment@gmail.com>
2023-03-20 09:29:30 +01:00
Sam Atkins
da7c883dfa
Snake: Move geometry types into Geometry.h and add Direction enum
2023-03-20 09:29:30 +01:00
Sam Atkins
3ce87ea5f9
Snake: Remember if game was paused when picking color
...
If we were paused before, don't start the game after closing the dialog.
2023-03-20 09:29:30 +01:00
Tim Schumacher
ae51c1821c
Everywhere: Remove unintentional partial stream reads and writes
2023-03-13 15:16:20 +00:00
Tim Schumacher
d5871f5717
AK: Rename Stream::{read,write} to Stream::{read_some,write_some}
...
Similar to POSIX read, the basic read and write functions of AK::Stream
do not have a lower limit of how much data they read or write (apart
from "none at all").
Rename the functions to "read some [data]" and "write some [data]" (with
"data" being omitted, since everything here is reading and writing data)
to make them sufficiently distinct from the functions that ensure to
use the entire buffer (which should be the go-to function for most
usages).
No functional changes, just a lot of new FIXMEs.
2023-03-13 15:16:20 +00:00
Karol Baraniecki
ddac8192e3
BrickGame: Add a "Pause" option to the Game menu
...
This is how the menu looks like after this commit:
┌────┐
│Game│ Help
├────┴─────────────────────────────┐
│ New game F2 │
│ Toggle pause P │
├──────────────────────────────────┤
│ Quit Alt+F4 │
└──────────────────────────────────┘
2023-03-13 06:43:59 +00:00
Karol Baraniecki
a337557658
BrickGame: Show a box with "Paused" in it when the game is paused
...
Looks a bit like this:
┌────────────┐
│ │
│ Paused │
│ │
└────────────┘
2023-03-13 06:43:59 +00:00
Karol Baraniecki
1fd61d2af3
BrickGame: Disallow manual piece movement while paused
...
This make the pause feature feel much better.
2023-03-13 06:43:59 +00:00
Karol Baraniecki
06a9e4280b
BrickGame: Stop bricks from falling when paused
...
Allows for pausing with either the `P` or `Escape` keys. In this commit
you can still rotate pieces when paused - which makes for an interesting
"stop-time" cheat mechanic, but probably isn't yet what we want.
2023-03-13 06:43:59 +00:00
Andreas Kling
a504ac3e2a
Everywhere: Rename equals_ignoring_case => equals_ignoring_ascii_case
...
Let's make it clear that these functions deal with ASCII case only.
2023-03-10 13:15:44 +01:00
Andreas Kling
359d6e7b0b
Everywhere: Stop using NonnullOwnPtrVector
...
Same as NonnullRefPtrVector: weird semantics, questionable benefits.
2023-03-06 23:46:35 +01:00
Andreas Kling
689ca370d4
Everywhere: Remove NonnullRefPtr.h includes
2023-03-06 23:46:35 +01:00
Andreas Kling
8a48246ed1
Everywhere: Stop using NonnullRefPtrVector
...
This class had slightly confusing semantics and the added weirdness
doesn't seem worth it just so we can say "." instead of "->" when
iterating over a vector of NNRPs.
This patch replaces NonnullRefPtrVector<T> with Vector<NNRP<T>>.
2023-03-06 23:46:35 +01:00
Andreas Kling
b71c7a6e44
Userland: Use Font::pixel_size_rounded_up() instead of glyph_height()
...
The only remaining clients of this API are specific to bitmap fonts and
editing thereof.
2023-03-04 00:29:38 +01:00
Linus Groh
09d40bfbb2
Everywhere: Use _{short_,}string to create Strings from literals
2023-02-25 20:51:49 +01:00
Andreas Kling
33e87d1627
Userland: Fix remaining smart pointer const-correctness issues
2023-02-21 00:54:04 +01:00
Sam Atkins
6b66e39df4
LibGUI+Userland: Stop returning Layout from Widget::(try_)set_layout()
...
Nobody uses this return value any more. It also lets us remove a whole
bunch of `(void)` casts. :^)
2023-02-18 16:56:56 +00:00
Sam Atkins
77ad0fdb07
Userland: Specify margins and spacing in the GUI::Layout constructor
2023-02-18 16:56:56 +00:00
Tim Schumacher
874c7bba28
LibCore: Remove Stream.h
2023-02-13 00:50:07 +00:00
Tim Schumacher
606a3982f3
LibCore: Move Stream-based file into the Core
namespace
2023-02-13 00:50:07 +00:00
Tim Schumacher
d43a7eae54
LibCore: Rename File
to DeprecatedFile
...
As usual, this removes many unused includes and moves used includes
further down the chain.
2023-02-13 00:50:07 +00:00
Karol Kosek
e39adc4772
Userland: Set Button text using the new String class
2023-02-13 00:45:09 +00:00
Karol Kosek
f802920a3a
Userland: Use default initializer instead of an empty string for Buttons
2023-02-13 00:45:09 +00:00
Karol Kosek
d32b052f22
LibGUI+Userland: Add _deprecated
suffix to AbstractButton::{set_,}text
2023-02-13 00:45:09 +00:00
MacDue
63b11030f0
Everywhere: Use ReadonlySpan<T> instead of Span<T const>
2023-02-08 19:15:45 +00:00
Lucas CHOLLET
55c5639004
Chess+LibChess: Avoid using DeprecatedString
whenever possible
2023-02-06 10:18:16 +00:00
Lucas CHOLLET
e7377c6d60
Chess: Move ChessWidget
to the create pattern
2023-02-06 10:18:16 +00:00
Karol Baraniecki
506c26acce
LibGUI+Userland: Switch order of parameters for InputBox::show
...
Because usage of the input_type parameter is now higher than of the
placeholder parameter, this makes for a cleaner API.
2023-02-04 18:46:39 -07:00
Karol Baraniecki
8095d9276b
Userland: Replace manual checking by using GUI::InputType::NonemptyText
...
Do this where we were already checking if the input was empty after the
InputBox was submitted. Those places gain interactive input validation.
:^)
2023-02-04 18:46:39 -07:00
Sam Atkins
0f2936d8cd
Chess+GamesSettings: Give chess pieces some breathing room
...
Draw pieces around 80% of the size of a square, instead of 100%, so that
there is a nice gap around them. This feels more comfy, and makes it
actually possible to read the coordinates while a piece is on their
square.
2023-02-04 12:29:03 +01:00
Sam Atkins
7e4186de63
Chess+GamesSettings: Use the correct term for chess squares
...
"Square" is the technical term, so let's use it. :^)
Also, stop using size_t for pixel sizes, that's not what that means.
2023-02-04 12:29:03 +01:00