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
Sam Atkins
3fbebe73a8
Chess: Replace 'Style' menu with a link to GamesSettings
...
GamesSettings provides a nicer way of editing these, rather than having
them crammed into a menu.
2023-02-02 14:52:21 +01:00
Sam Atkins
89d7d29d68
Chess: Automatically update and repaint when the config changes
2023-02-02 14:52:21 +01:00
Sam Atkins
64c9c7a4da
Chess: Paint pieces using BilinearBlend instead of NearestNeighbor
...
This makes the pieces look a lot nicer when the window isn't the exactly
ideal size. Vector images might be worth pursuing later.
2023-02-02 14:52:21 +01:00
Sam Atkins
e9eeaedc24
Chess: Stop hiding the frame border
...
This `fill_rect()` call was covering the nice border that we just
painted a few lines earlier.
2023-02-02 14:52:21 +01:00
Sam Atkins
3d38b7a127
Chess: Move configuration values into the "Games" domain
...
Chess is a game, after all. This makes more sense once we have chess
settings in GamesSettings. :^)
2023-02-02 14:52:21 +01:00
Sam Atkins
1cb6494852
Chess: Stop trying to read non-existent window-size config value
...
Nobody ever sets this, and it doesn't seem especially useful, so let's
remove it.
2023-02-02 14:52:21 +01:00
Sam Atkins
ced59fb3a0
Spider: Make double-click skip the new-game animation
2023-02-01 14:19:15 +00:00
Sam Atkins
8744e8b561
Spider: Use a single State enum instead of a series of booleans
2023-02-01 14:19:15 +00:00
Sam Atkins
5de8b38783
Solitaire: Make double-click skip the new-game animation
2023-02-01 14:19:15 +00:00
Sam Atkins
e8d83b1ae1
Solitaire: Use a single State enum instead of a series of booleans
...
We had 4 different bools before, but the only valid states were either
that only one of them was true, or than none of them are true. An enum
is a better fit here, by enforcing that we can only be in one state at
a time.
2023-02-01 14:19:15 +00:00
Linus Groh
6e7459322d
AK: Remove StringBuilder::build() in favor of to_deprecated_string()
...
Having an alias function that only wraps another one is silly, and
keeping the more obvious name should flush out more uses of deprecated
strings.
No behavior change.
2023-01-27 20:38:49 +00:00