1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-14 17:57:38 +08:00
Commit Graph

62 Commits

Author SHA1 Message Date
Bartłomiej Dach
6f37487528
Replace calls to defective Humanizer methods with correct version 2022-07-18 22:34:58 +02:00
Bartłomiej Dach
ffa9a83a4f
Add own fixed copy of defective Humanizer methods 2022-07-18 21:37:31 +02:00
andy840119
48047f2e58 Move the null check in the outside.
AddCursor() should not accept the null value.
2022-06-30 23:29:49 +08:00
andy840119
a5b1f1a688 mark the string as nullable. 2022-06-30 23:23:14 +08:00
andy840119
26de34da84 Remove the nullable disable annotation. 2022-06-30 23:20:40 +08:00
Dean Herbert
31a447fda0 Update parameter discards 2022-06-24 21:26:19 +09:00
Dan Balasescu
f8830c6850 Automated #nullable processing 2022-06-17 16:37:17 +09:00
Salman Ahmed
c8665dc93b Update TimeSpan localisation to use ToLocalisableString 2022-04-28 11:12:50 +03:00
Dean Herbert
c99397f75a Add the ability to add settings to skinnable elements 2022-03-13 17:03:25 +09:00
Dean Herbert
42e07b7308 Convert to extension method to avoid recursive calls 2022-03-03 14:15:37 +09:00
Dean Herbert
2f6e65a9a2 Gracefully handle undefined DateTimeOffset values
Only seems to happen in tests, but best to safeguard against this
regardless.
2022-02-21 16:35:40 +09:00
Dean Herbert
fc1877b6fa Move to extension method and revert logic to match previous implementation 2022-02-21 13:42:26 +09:00
Dean Herbert
5736b7d978 Fix cursors sent to osu-web being potentially string formatted in incorrect culture
Fixed as per solution at https://github.com/JamesNK/Newtonsoft.Json/issues/874.

Note that due to the use of `JsonExtensionDataAttribute` it's not
feasible to change the actual specification to `JValue` in the
`Dictionary`.

In discussion with the osu-web team, it may be worthwhile to change the cursor
to a string format where parsing is not required at our end. We could already
do this in fact, but there are tests that rely on it being a `JToken` so the
switch to `JValue` seems like the easier path right now.
2022-01-04 17:20:46 +09:00
Dean Herbert
c9f6c5c673 Add MatchesOnlineID implementation for IScoreInfo 2021-12-10 18:34:31 +09:00
Dean Herbert
416ee2447a Move archive filename helper method to extension method 2021-11-25 16:35:54 +09:00
Dean Herbert
3946a39b65 Make BeatmapSet.Metadata non-null 2021-11-24 15:03:34 +09:00
Dean Herbert
6fb2757739 Remove usage of Nuget.Packaging extension methods for IList.AddRange 2021-11-23 15:02:02 +09:00
Dean Herbert
59e763467f Move StoragePath implementation to an extension method 2021-11-19 16:08:38 +09:00
Dean Herbert
66c307e0ee Remove usage of key repeat helper method 2021-11-18 13:13:36 +09:00
Dean Herbert
2cbdac91ad Add missing APIUser comparison method 2021-11-16 12:44:20 +09:00
Dean Herbert
fbc46941fa Add type safety to MatchesOnlineID extension methods 2021-11-16 12:37:47 +09:00
Dean Herbert
18f73b985b Make ModelExtensions nullable enabled 2021-11-15 14:38:01 +09:00
Dean Herbert
a4c11e8813 Use extension method to compare online IDs 2021-11-15 14:34:50 +09:00
Dean Herbert
98dcf487da Add fallback case for GetDisplayString if called on a null reference 2021-11-12 16:02:51 +09:00
Bartłomiej Dach
5ec8288508
Add GetDisplayString() extension to handle all model interface types globally 2021-11-09 13:53:07 +01:00
Bartłomiej Dach
baf9961934
Amend xmldoc of shake extension method 2021-09-14 22:50:45 +02:00
Dean Herbert
e17b800470 Move shake logic into extension method 2021-09-14 14:44:23 +09:00
Dean Herbert
7a44ddb36b Update incorrect xmldoc 2021-07-31 16:48:45 +09:00
Dean Herbert
472c0137ec Add new extension for formatting time durations 2021-07-31 16:45:53 +09:00
Dean Herbert
c751e087ca
Merge branch 'master' into skin-editor-closest-anchor 2021-06-18 18:54:07 +09:00
Bartłomiej Dach
cc5145a131 Fix languages with a sub-language part not working properly 2021-06-16 11:10:03 +02:00
Robin Avery
dc50ae40b9
Rename OverridesClosestAnchor to UsesFixedAnchor 2021-06-08 08:28:42 -04:00
Robin Avery
133d72a8c0
Rename UsingClosestAnchor
It is now "OverridesClosestAnchor". The logic is inverted accordingly.
2021-06-07 00:14:36 -04:00
Robin Avery
f28916e30f
Remove all UsingClosestAnchor() extension logic
It is replaced with ISkinnableDrawable.UsingClosestAnchor.
2021-06-07 00:04:53 -04:00
Robin Avery
da1c38d5a9
Uninvert logic of SkinnableInfo.UsingClosestAnchor
Also rename "IsUsingClosestAnchor" to simply "UsingClosestAnchor".
2021-06-06 10:13:35 -04:00
Robin Avery
11b1b8c633
Add serialization support via SkinnableInfo 2021-06-06 07:18:08 -04:00
Robin Avery
c9f5808bf2
Move lookup logic to DrawableExtensions
This is now a global lookup to be shared by serialization and editor.
2021-06-06 06:58:21 -04:00
Bartłomiej Dach
43c73f9583 Mark access to exception if task faulted as safe
There are seemingly no C#-side compile-time guarantees that it is safe,
but if the task's state is `Faulted` (as is checked right before), the
exception cannot be null as per the documentation.
2021-05-15 00:09:34 +02:00
Dean Herbert
3b862798e9 Standardise naming of methods related to SkinnableInfo 2021-05-13 13:14:49 +09:00
Dean Herbert
8b9ac86d4b Merge branch 'master' into skin-serialisation 2021-05-13 12:35:06 +09:00
Bartłomiej Dach
1b579dd838 Extract invariant instantiation info extension method 2021-05-12 23:23:51 +02:00
Dean Herbert
c94df672e5 Also serialise Origin out 2021-05-11 18:39:14 +09:00
Dean Herbert
6a88b8888b Add basic support for child serialisation 2021-05-11 18:39:14 +09:00
Dean Herbert
95a497e9df Remove unused interface class for simplicity 2021-05-11 18:39:14 +09:00
Dean Herbert
95a8f21ab2 Add the concept of skinnable target containers and mark a basic one for HUD elements 2021-05-11 18:39:14 +09:00
Dean Herbert
b9ab9342fa Setup basics to allow extracting serializable content from skinnable Drawables 2021-05-11 18:39:14 +09:00
Dean Herbert
9c62c90cfc Refactor SelectionBlueprint and MoveSelectionEvent to work in screen-space coordinates
Until now, the implementation of the overrides in `SelectionBlueprint`
have been confusing to the point where I would just implement by
trial-and-error (or copying from an existing implementation). This was
due to a combination of using "object" space coordinates
(ie. the thing the `Blueprint` is operating on) and screen-space coordinates.

This change switches all event related coordinates to screen-space,
which is how we already handle rotation/scale operations. With the
introduction of other editor types where the related objects are
drawables, this also makes a lot more sense.
2021-04-29 16:10:42 +09:00
Dean Herbert
8282f38eb7 Fix volume controls not supporting key repeat 2021-04-14 13:11:24 +09:00
Bartłomiej Dach
9ab1ad25eb Merge branch 'master' into fix-leave-room-race-2 2021-01-30 13:41:04 +01:00
Dean Herbert
a61444690e Remove all usage of CatchUnobservedExceptions
This should no longer be required with the recent framework side change
that stops a game from crashing on unobserved exceptions
(https://github.com/ppy/osu-framework/pull/4171).
2021-01-29 16:32:29 +09:00