Commit Graph

510 Commits

Author SHA1 Message Date
d661e98fa6 Move common functionality out of OsuSelectionHandler and implement flip support 2021-05-18 18:34:06 +09:00
a96603f025 Merge pull request #12782 from smoogipoo/rework-hitobject-blueprints
Rename hitobject blueprints and tie them to HitObjects
2021-05-18 16:30:58 +09:00
532c41c82e Remove nested blueprints from sliders 2021-05-18 14:19:11 +09:00
e621cfc4ea Add Apply() method for applying new DHOs 2021-05-18 14:14:10 +09:00
ffb6135a1b Rework hitobject blueprints to take in hitobject models 2021-05-13 19:53:32 +09:00
19800f5f7f Move IBeatmap arg into context 2021-05-13 11:24:22 +02:00
b7bc42e0d3 Rename "playableBeatmap" check arg to "beatmap"
The working beatmap is now in the context, so it's easier to distinguish beatmap type, hence no need for this prefix.
2021-05-12 02:34:16 +02:00
c13b93e6f1 Replace IWorkingBeatmap arg with BeatmapVerifierContext in checks
This simplifies passing of contextual information by enabling addition without needing to refactor lots of classes.

See next commit for example.
2021-05-12 02:29:18 +02:00
01d732bb65 Revert "Refactor SliderSelectionBlueprint to not reference blueprint pieces for input handling"
This reverts commit 54fe10c82a.
2021-05-08 23:33:03 +09:00
63e267a3be Revert "Trim redundant this qualifier"
This reverts commit df630d9428.
2021-05-08 23:32:52 +09:00
df630d9428 Trim redundant this qualifier 2021-05-08 14:53:19 +02:00
54fe10c82a Refactor SliderSelectionBlueprint to not reference blueprint pieces for input handling 2021-05-07 10:36:03 +09:00
39067e6926 Fix slider input handling potentially being offset after composer area resize
Closes https://github.com/ppy/osu/issues/12671.
2021-05-06 17:19:19 +09:00
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
f586bc46e6 Avoid using EditorBeatmap.SelectedHitObjects 2021-04-27 19:01:29 +09:00
f2e56bd306 Refactor editor selection/blueprint components to be generic 2021-04-27 19:01:29 +09:00
ec1c336b0a Fix a couple of inspections 2021-04-27 13:23:14 +09:00
8795c5f082 Update osu! editor transform logic to allow adjustments to DrawableSliderRepeat and DrawableSliderTail 2021-04-26 15:27:10 +09:00
e8d83f2f99 Rename "EditRuleset" and "EditPlayfield" to use full "Editor" keyword 2021-04-26 14:33:30 +09:00
0f70469d1c Only apply custom editor overrides if hit animations is disabled 2021-04-21 19:44:17 +09:00
f2824a222a Adjust existing fades to close match stable editor 2021-04-21 19:41:15 +09:00
8656176ab8 Add the playable beatmap as check argument
This is different from the working beatmap's `.Beatmap` property in that it is mutated by the ruleset/editor.

So hit objects, for example, are actually of type `Slider` and such instead of the legacy `ConvertSlider`.

This should be preferred over `workingBeatmap.Beatmap`.
2021-04-20 01:31:51 +02:00
56bf49c85c Take IWorkingBeatmap instead of WorkingBeatmap
This makes testing much easier, and allows for checking of any class deriving from that interface, including `WorkingBeatmap`.
2021-04-18 01:21:20 +02:00
448574e7e6 Use WorkingBeatmap instead of IBeatmap
This lets us access things like the background, track, etc. which are necessary for quality and filesize checks.

Also improves the structure of the `CheckBackgroundTest` class in the process.
2021-04-17 17:33:53 +02:00
401bf368a7 Merge branch 'fix-slider-scale-crash' into fix-slider-zero-length 2021-04-16 16:58:19 +09:00
8de68e0ebf Fix div-by-zero when scaling a 1-dimensional slider 2021-04-16 16:55:26 +09:00
ff408b852e Handle scaling a slider below minimum length 2021-04-16 15:45:24 +09:00
89373638be Handle control point deletion when the resulting slider would be too short to be useful 2021-04-16 15:45:24 +09:00
2949a6bbdc Handle control point drag revert 2021-04-16 15:45:24 +09:00
d38e294d96 Centralise length validation function 2021-04-16 15:45:24 +09:00
965a1ead36 Disallow zero-length slider blueprint placements 2021-04-16 14:38:30 +09:00
5c0ef55691 Rename SliderPlacementState to make way for more generic version 2021-04-16 14:09:35 +09:00
1ff4e2076f Merge branch 'master' into verify-tab 2021-04-13 23:05:48 +09:00
03ba04e8ce Split out general checks into its own verifier class (and remove static usage) 2021-04-13 19:50:22 +09:00
304fe5cd34 Add CheckBackground to OsuBeatmapVerifier 2021-04-13 10:41:02 +02:00
60c2494b31 Make BeatmapVerifier an interface 2021-04-13 10:40:56 +02:00
c8cb4286f6 Add reference for screen bounding box numbers 2021-04-13 10:35:06 +02:00
fbc6fb8fc5 Split out common logic into private method and add inline comment for future visitors 2021-04-13 15:35:57 +09:00
6d3f9fa9ce Use is class instead of Equals with template index
Ensures ordering of `PossibleTemplates` does not affect tests.
2021-04-13 02:29:25 +02:00
d9e3276d0e Don't update path type once immediately 2021-04-12 19:18:22 +02:00
19a154ddf1 Rename checkOrigin -> check
More consistent with `Issue.ctor`'s "template".
2021-04-12 17:28:12 +02:00
bb720c23a0 Remove check ctors and locals 2021-04-12 17:12:37 +02:00
62c1812282 Remove redundant parameter naming 2021-04-12 23:37:47 +09:00
36bd235021 Move nested classes to bottom of file 2021-04-12 23:36:10 +09:00
7c4f6d2b62 Rework template usage
Includes moving the origin check back to templates, constructing nested template classes in each check, and making parameterized template usage.
2021-04-12 15:47:26 +02:00
65ebdd8f7a Move check origin from IssueTemplate to Issue
As a result we can also make check an interface, and need to provide the check itself when constructing an issue.
2021-04-12 10:08:08 +02:00
8bf85d737c Change Metadata into a get property 2021-04-12 15:52:29 +09:00
8c31e96cdf Change some methods to get properties 2021-04-12 15:52:18 +09:00
f78239c7f2 Move enums out of nesting 2021-04-12 15:52:18 +09:00
1c553b5d48 Checker -> BeatmapVerifier 2021-04-12 15:29:05 +09:00