1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 08:07:24 +08:00
Commit Graph

1063 Commits

Author SHA1 Message Date
Dean Herbert
14bdcef26b Add missing newline 2021-06-22 16:20:09 +09:00
Dean Herbert
0ad189e357 Expose skin sources via ISkinSource and revert to consuming based on hierarchy 2021-06-22 16:19:55 +09:00
Dean Herbert
1b0aadcc6f Merge branch 'master' into transformers-per-skin 2021-06-22 16:03:15 +09:00
Salman Ahmed
ec040ff3fc Fix leak due to not properly unbinding SourceChanged event on disposal 2021-06-22 05:05:41 +03:00
Salman Ahmed
caa90bccc6 Fix default skin potentially added twice in RulesetSkinProvidingContainer 2021-06-22 03:45:43 +03:00
Salman Ahmed
627c857da8 Propagate SourceChanged events from SkinManager down in the ruleset skin container 2021-06-22 03:45:24 +03:00
Salman Ahmed
9e5bb146d3 Add xmldoc to SkinManager
The `<summary>` part comes from `BeatmapManager`, which I believe works correctly here as well, as this does handle the "storage and retrieval" of skins.
2021-06-22 03:07:31 +03:00
Salman Ahmed
97dbc7f20e Add back SkinManager.DefaultSkin to the ruleset skin lookup sources 2021-06-22 02:54:34 +03:00
Salman Ahmed
d53a43cf3c Isolate RulesetSkinProvidingContainer from falling back to parent skin sources
For simplicity of lookup order, and which sources are used for the lookup.
2021-06-22 02:53:22 +03:00
Salman Ahmed
ebe0d43790 Add ability to disallow falling back to parent skins 2021-06-22 02:51:17 +03:00
Salman Ahmed
5cfd0e3223 Remove implicit LegacySkin check and refactor anything using it 2021-06-21 04:16:58 +03:00
Dean Herbert
c751e087ca
Merge branch 'master' into skin-editor-closest-anchor 2021-06-18 18:54:07 +09:00
Salman Ahmed
780388d174 Fix incorrect return value 2021-06-17 03:48:29 +03:00
Salman Ahmed
74ad6f9117 Remove default skin from the ruleset skin sources
That one doesn't need any changes to it, can be fetched from the `SkinManager` instead.
2021-06-16 17:24:31 +03:00
Salman Ahmed
52ddf08532 Consider not adding legacy skin transformers to non-legacy skins 2021-06-16 17:24:16 +03:00
Salman Ahmed
5ebf570ec4 Revert GetRulesetTransformedSkin accessibility change
This reverts commit 521077b714.

Forgot to do it when I made this `protected`, but subclasses in test scenes require this.
2021-06-16 16:49:38 +03:00
smoogipoo
2155a4da0a Fix intermittent HUD test failure 2021-06-16 19:52:58 +09:00
Dean Herbert
521077b714 Make getRulesetTransformedSkin private 2021-06-16 17:44:18 +09:00
Dean Herbert
4b45d8318e
Merge branch 'master' into transformers-per-skin 2021-06-16 16:37:28 +09:00
Salman Ahmed
8de0d33c5a Revert "Move collection change bind to LoadComplete"
This reverts commit d6d87e1975.

Actually that broke things due to the "disableable" instances not added early enough, revert for now.
2021-06-11 17:59:29 +03:00
Salman Ahmed
b6947c25ec Fix potentially adding the same skin multiple times 2021-06-11 17:55:07 +03:00
Salman Ahmed
d6d87e1975 Move collection change bind to LoadComplete
Best practice anyways
2021-06-11 17:35:33 +03:00
Salman Ahmed
108a3deb27 Also handle null Ruleset.CreateLegacySkinProvider values
Let's just go this way for now, maybe it's a better choice to always create transformers and disallow null, but it's too much work and out of scope at this point
2021-06-11 16:26:54 +03:00
Bartłomiej Dach
550d566bf9 Simplify member access 2021-06-11 14:24:17 +02:00
Bartłomiej Dach
876a357bf2 Add support for animated colour fill in new style legacy health bar 2021-06-11 14:24:17 +02:00
Robin Avery
0c8851f4b7
Extract drawable.ScreenSpaceDrawQuad to a variable 2021-06-11 07:06:22 -04:00
Robin Avery
a6774eb5b5
Inline getOriginPositionFromQuad 2021-06-11 06:59:00 -04:00
Robin Avery
c9b4f9eb71
Make getOriginPositionFromQuad local 2021-06-11 06:55:47 -04:00
Robin Avery
1bc8460902
Rename getTieredComponent to getAnchorFromPosition
Also rename parameter `component` to `xOrY`.
2021-06-11 06:53:40 -04:00
Robin Avery
6e181a6b63
Rename parameters of getTieredComponent 2021-06-11 06:53:04 -04:00
Robin Avery
a76eaeb52d
Make getTieredComponent local 2021-06-11 06:51:12 -04:00
Robin Avery
635300b311
Recalculate closest anchor when origin is changed 2021-06-11 06:28:30 -04:00
Robin Avery
a506f2a776
Revert rename of lambda variables 2021-06-11 06:22:24 -04:00
Salman Ahmed
f20146d446 Fix potentially adding null skin sources 2021-06-11 12:58:38 +03:00
Salman Ahmed
e59beffc4e Forward all base transformer lookup methods to Skin 2021-06-11 12:44:25 +03:00
Salman Ahmed
9e16359f18 Refactor disallowing in SkinProvidingContainer to become per source
Fixes `FindProvider` becoming completely broken, because of no way to perform the checks on one skin source.
2021-06-11 12:29:29 +03:00
Salman Ahmed
2e01e61177 Move TODO comment to correct location 2021-06-11 11:46:30 +03:00
Salman Ahmed
8132852753 Add other affectable change action cases 2021-06-11 11:34:22 +03:00
Salman Ahmed
a985e3b8d3
Apply documentation settings for better readability
Co-authored-by: Dean Herbert <pe@ppy.sh>
Co-authored-by: Dan Balasescu <smoogipoo@smgi.me>
2021-06-11 11:25:07 +03:00
Dean Herbert
debd359d2e Update xmldoc 2021-06-11 14:50:21 +09:00
Dean Herbert
b9050f91a4 Expose as Skins and consume SkinInfo from instances 2021-06-11 14:49:35 +09:00
Salman Ahmed
169c98f963 Add skin providing ruleset resources in RulesetSkinProvidingContainer 2021-06-11 00:25:22 +03:00
Salman Ahmed
2240e2c39c Refrain from attempting to clear skin sources in disposal
`Drawable.Dispose` is usually in an asynchronous context (async disposals stuff) and therefore this could cause a "collection was modified; enumeration opeartion may not execute" exception.
2021-06-10 17:23:16 +03:00
Salman Ahmed
ef2c4fd0d8 Make RulesetSkinProvidingContainer able to be overriden for testing purposes 2021-06-10 16:36:46 +03:00
Salman Ahmed
09a2d008d2 Refrain from attempting to transform null skins 2021-06-10 16:36:45 +03:00
Salman Ahmed
5c9c424a0d Switch state case placements for consistency
Tickled me.
2021-06-10 13:15:18 +03:00
Salman Ahmed
c3a2f2c2a4 Expose default SkinManager providers for use in RulesetSkinProvidingContainer 2021-06-10 13:07:32 +03:00
Salman Ahmed
59be3588eb Change SkinSources to a bindable list for binding SourceChanged events 2021-06-10 13:07:32 +03:00
Salman Ahmed
dde84e5cbd Merge branch 'master' into transformers-per-skin 2021-06-10 11:58:52 +03:00
Salman Ahmed
58cca9da06 Revert "Expose the skin lookup layers of SkinManager to a property"
This reverts commit 9e652715ce.
2021-06-10 11:57:28 +03:00
Salman Ahmed
530026b675 Add simple xmldoc to ctors explaining their deal with SkinSources 2021-06-10 11:56:13 +03:00
Salman Ahmed
18edbdd135 Remove mentioning of "layer" in skin providers
`SkinSources` sounds better.
2021-06-10 11:55:26 +03:00
Dan Balasescu
479d6d3fc5
Merge branch 'master' into fix-beatmap-skin-disables 2021-06-10 16:37:58 +09:00
Salman Ahmed
33a9cac398 Add special RulesetSkinProvidingContainer managing ruleset-compatible skin setup 2021-06-09 22:49:31 +03:00
Salman Ahmed
9e652715ce Expose the skin lookup layers of SkinManager to a property 2021-06-09 22:49:31 +03:00
Salman Ahmed
6538d44708 Make SkinProvidingContainer able to perform lookup on multiple skins
Currently `protected` functionality for use in custom `SkinProvidingContainer`s, can be exposed to public constructors if it need to later on, but I'm not sure about doing that opposed to just nesting multiple `SkinProvidingContainer`.
2021-06-09 22:49:31 +03:00
Salman Ahmed
cf40282f1f Convert LegacySkinTransformers to accept raw ISkins rather than a full ISkinSource 2021-06-09 22:49:31 +03:00
Dean Herbert
0cf7c56e7e Add fallback lookup support for DefaultSkin 2021-06-09 18:51:42 +09:00
Dean Herbert
2438c20d63 Fix SourceChanged not being correctly forwarded through LegacySkinTransformer 2021-06-09 17:56:07 +09:00
Dean Herbert
448e4e7ee5 Fix FindProvider calls on SkinProvidingContainer not considering disable flags
Closes #13394.
2021-06-09 16:19:04 +09:00
Robin Avery
2484ccd50c
Ensure scale x or y does not go below zero in SkinSelectionHandler.HandleScale 2021-06-08 11:49:25 -04:00
Robin Avery
10b6b72909
Add guard clause to applyOrigins and rename parameter 2021-06-08 10:29:45 -04:00
Robin Avery
d212918d67
Rename applyCustomAnchors to applyFixedAnchors for consistency with UsesFixedAnchor 2021-06-08 10:14:07 -04:00
Robin Avery
2c88e6df8d
Simplify applyClosestAnchor to one line by moving another guard clause 2021-06-08 10:09:48 -04:00
Robin Avery
f22cc981d1
Move guard clause from checkAndApplyClosestAnchor to applyAnchor 2021-06-08 09:51:39 -04:00
Robin Avery
529a80871b
Rename some methods for clarity
Methods which operate on a collection of `ISkinnableDrawable`s are now
plural; ones which take a single item are singular.

This also allows cutting down the name of `getClosestAnchorForDrawable`
to just `getClosestAnchor`.
2021-06-08 09:44:42 -04:00
Robin Avery
01da73daf2
Refactor updateDrawableAnchorIfUsingClosest 2021-06-08 09:25:49 -04:00
Robin Avery
6b127f50f2
Inline updateDrawableAnchorIfUsingClosest 2021-06-08 09:14:04 -04:00
Robin Avery
dc50ae40b9
Rename OverridesClosestAnchor to UsesFixedAnchor 2021-06-08 08:28:42 -04:00
Dean Herbert
6017ef3825
Merge branch 'master' into fix-skin-sample-lookup 2021-06-08 17:37:36 +09:00
Dan Balasescu
791855dfa0
Merge branch 'master' into legacy-skin-default-fallback 2021-06-08 16:54:26 +09:00
Dan Balasescu
67135ce3db
Add null check 2021-06-08 16:15:17 +09:00
Dean Herbert
e0f568aa8f Merge branch 'legacy-skin-default-fallback' into fix-skin-sample-lookup 2021-06-08 15:19:52 +09:00
Dean Herbert
f3f634e969 Clean up previous sample immediately on skin source change to avoid Play after disposal
This seems to be the simplest way to avoid calls to `Play` after the
underlying sample may have been disposed. As per the issue thread, a
local workaround is acceptable here.

Closes #13223.
2021-06-08 15:05:18 +09:00
Dean Herbert
27e3de3ea3 Add TODO about beatmap skin fallback support 2021-06-08 12:12:14 +09:00
Dean Herbert
06840d78cc Remove now unused method 2021-06-08 12:06:42 +09:00
Dean Herbert
2c1f22d7ae Refactor animation lookup to properly handle skins providing non-animated resources 2021-06-08 01:17:20 +09:00
Dean Herbert
e7e9197f03 Fix FindProvider not correctly checking legacy default in SkinManager 2021-06-08 00:42:50 +09:00
Dean Herbert
6d56e02ddb Add back incorrectly reverted animation handling logic
This reverts commit b904fa6615.
2021-06-08 00:17:01 +09:00
Dean Herbert
c0305343bc Fix FindProvider incorrectly returning LegacySkinTransformer itself 2021-06-07 23:23:44 +09:00
Dean Herbert
08701b5eab Ensure all lookups in LegacyHealthDisplay use the found provider
Not actually needed to fix the remaining issue but does feel better
2021-06-07 23:23:12 +09:00
Robin Avery
65f594f860
Rename applyAnchor to applyCustomAnchor 2021-06-07 05:08:18 -04:00
Robin Avery
6c9594ee35
Simplify and rearrange SkinSelectionHandler
The file has been restructured and reworded such that there are as few
differences as possible from b36b40cb34.
2021-06-07 02:40:15 -04:00
Robin Avery
29fa4fdf57
Refactor unacceptable syntax 2021-06-07 01:08:39 -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
ce635af83e
Add UsingClosestAnchor to ISkinnableDrawable
Also implement it as an auto property in its inheritors.
The auto properties default to true.
2021-06-06 23:47:47 -04:00
Dean Herbert
d26c9a66c2 Merge branch 'legacy-skin-default-fallback' into fix-skin-sample-lookup 2021-06-07 12:01:19 +09:00
Robin Avery
6a456e53f4
Rename overly long method 2021-06-06 13:28:17 -04:00
Robin Avery
888882ac63
Remove first-person comment 2021-06-06 13:27:13 -04:00
Dean Herbert
e10dfab2e8 Ensure scorebar marker lookup is performed on the source the background is retrieved from 2021-06-06 23:23:35 +09:00
Robin Avery
da1c38d5a9
Uninvert logic of SkinnableInfo.UsingClosestAnchor
Also rename "IsUsingClosestAnchor" to simply "UsingClosestAnchor".
2021-06-06 10:13:35 -04:00
Dean Herbert
b5f145cfa9 Use null propagation for animation lookups 2021-06-06 23:01:37 +09:00
Robin Avery
63346f6b75
Refactor getTieredComponent 2021-06-06 09:40:58 -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
Robin Avery
4aee76456f
Replace localised strings with static English 2021-06-06 05:34:32 -04:00
Robin Avery
c452715bf1 Allow skin elements to find closest anchor
- Resolves ppy/osu#13252
- Add localisation strings for the context menu instead of using enum
2021-06-06 01:32:04 -04:00
Dean Herbert
b904fa6615 Revert "Ensure all frames in an animation are retrieved from the same skin"
This reverts commit 37c8c63fc5.
2021-06-06 12:37:42 +09:00
Dean Herbert
b87a5956dd Add fallback logic to SkinManager 2021-06-06 12:17:55 +09:00
Dean Herbert
39f99bf785 Move FindProvider to ISkinSource 2021-06-06 12:17:32 +09:00
Dean Herbert
ae2165b3be Fix incorrect xmldoc 2021-06-04 16:44:04 +09:00
Dean Herbert
37c8c63fc5 Ensure all frames in an animation are retrieved from the same skin 2021-06-04 16:18:04 +09:00
Dan Balasescu
c065f761c7
Merge branch 'master' into legacy-skin-default-fallback 2021-06-02 19:08:52 +09:00
Dean Herbert
2e2281c7d2 Revert disabling taiko sample tests and fix logic 2021-06-01 18:57:19 +09:00
Dean Herbert
3a6d081d82 Remove duplicated taiko fallback 2021-06-01 18:04:49 +09:00
Dean Herbert
ea4644be90 Revert "Fix weird taiko logic failing for weird reasons that probably should not have been a thing"
This reverts commit 69c4ccad05.
2021-06-01 18:04:49 +09:00
Dean Herbert
a837fc9e3b Remove duplicated taiko fallback 2021-06-01 18:00:24 +09:00
Dean Herbert
df0a5689e4 Revert "Fix weird taiko logic failing for weird reasons that probably should not have been a thing"
This reverts commit 69c4ccad05.
2021-06-01 17:13:13 +09:00
Dean Herbert
ff815cb4b4 Fix incorrect xmldoc 2021-06-01 16:57:41 +09:00
Salman Ahmed
7c6400735f Merge branch 'master' into remove-hud-component-lookup 2021-06-01 10:17:52 +03:00
Dean Herbert
00b3eea840 Merge branch 'legacy-skin-default-fallback' into fix-skin-sample-lookup 2021-05-31 21:39:04 +09:00
Dean Herbert
69c4ccad05 Fix weird taiko logic failing for weird reasons that probably should not have been a thing 2021-05-31 21:29:47 +09:00
Dean Herbert
1161378b6b Fix incorrect fallback logic in LegacyBeatmapSkin 2021-05-31 21:29:47 +09:00
Dean Herbert
282c5a9177 Fix potential nullref in SkinProvidingContainer 2021-05-31 21:29:47 +09:00
Dean Herbert
3ff9f9c89d Make FindProvider non-default 2021-05-31 21:29:47 +09:00
Dean Herbert
8e489754cc Add ability for LegacySkins to customise the fallback provider 2021-05-31 21:29:47 +09:00
Dean Herbert
88ed95e012 Add FindProvider lookup function 2021-05-31 21:29:47 +09:00
Dean Herbert
1d30791ab0 Add potential pathway for legacy lookups 2021-05-31 21:29:47 +09:00
Dean Herbert
4b27d43e26 Add new parameter for default fallback logic in LegacySkin 2021-05-31 21:29:47 +09:00
Dean Herbert
17fa2426d4 Merge branch 'master' into legacy-skin-resource-improvements 2021-05-31 19:36:09 +09:00
Dean Herbert
65709ec7d7 Move leagcy resource store construction local to DefaultLegacySkin 2021-05-31 19:14:49 +09:00
Dean Herbert
b16d10bd95 Provide game-wide resources via IStorageResourceProvider 2021-05-31 18:57:47 +09:00
Dean Herbert
de0e51a81d Merge branch 'master' into fix-skin-sample-lookup 2021-05-31 15:27:39 +09:00
Salman Ahmed
02d18c7a49 Merge branch 'master' into remove-hud-component-lookup 2021-05-31 09:23:04 +03:00
Salman Ahmed
fb81e5133f Merge branch 'master' into catch-hide-combo-workaround 2021-05-30 14:16:46 +03:00
Salman Ahmed
53cbf369d7 Fix potential nullref 2021-05-29 21:22:46 +03:00
Salman Ahmed
42618c713f
Merge branch 'master' into legacy-beatmap-skin-hud-fallback 2021-05-29 20:56:05 +03:00
Dean Herbert
70a844ac10 Remove allowFallback parameters completely 2021-05-27 14:50:42 +09:00
Dean Herbert
4fd89faaa4 Fix default skin not having resources or providing samples 2021-05-27 14:09:01 +09:00
Dean Herbert
b36b40cb34 Remove unnecessary double specification 2021-05-26 15:20:47 +09:00
kamp
65649e5a62 Prevent skin editor crash when scaling 0 area drawables
Some skinnable drawables can have 0 width or height in certain
cases, leading to division by 0 and a crash when the position is
updated.
2021-05-24 21:36:42 +02:00
Dean Herbert
caa2c5638e Fix legacy combo counter not accounting for song progress bar 2021-05-23 16:46:57 +09:00
Dean Herbert
45c6a9ca91 Merge branch 'refactor-selection-rotate-logic' into fix-flip-logic-discrepancy 2021-05-22 21:17:58 +09:00
Dean Herbert
7d88a19d7f Remove unnecessary field storage of origin reference 2021-05-22 21:03:40 +09:00
Dean Herbert
34a5b22b79 Merge branch 'master' into refactor-selection-rotate-logic 2021-05-22 20:52:28 +09:00
Dean Herbert
485728ca4e
Merge pull request #12866 from peppy/refactor-selection-scale-logic
Add proper scaling support to skin editor
2021-05-22 20:07:03 +09:00
Dean Herbert
bb2fae55ce Merge branch 'master' into refactor-selection-rotate-logic 2021-05-21 19:19:54 +09:00
Dean Herbert
0d575f5728 Remove incorrect (and unintended) modulus logic 2021-05-21 15:06:53 +09:00
Dean Herbert
f9d51656b6 Fix scaling of rotated items not behaving in an understandable way 2021-05-21 15:02:36 +09:00
Dan Balasescu
7845d07dd5
Merge pull request #12886 from peppy/fix-skin-editor-context-menu-sticking
Fix skin editor context menus not dismissing when clicking away
2021-05-20 21:03:35 +09:00
Dean Herbert
1848bd902d Fix skin editor context menus not dismissing when clicking away 2021-05-20 19:51:07 +09:00
Dean Herbert
df5970fab4 Create base implementations of the two most common TernaryStateMenuItems 2021-05-20 19:34:53 +09:00
Dean Herbert
20f1ef4318 Extract common implementation of updating drawable position from screen space pos 2021-05-20 18:35:13 +09:00
Dean Herbert
6f75c59760 Fix flip logic not using the full selection quad 2021-05-20 18:31:51 +09:00
Dean Herbert
95c78b9185 Split out common selection quad logic 2021-05-20 18:24:25 +09:00
Dean Herbert
27e81d6504 Implement proper rotation algorithm for skin editor 2021-05-20 18:21:16 +09:00
Salman Ahmed
43094425e2 Merge branch 'legacy-beatmap-skin-hud-fallback' into catch-hide-combo-workaround 2021-05-19 23:18:27 +03:00
Salman Ahmed
9f3ea150f5 Fix legacy beatmap skins not falling back properly on HUD components 2021-05-19 23:01:29 +03:00
Bartłomiej Dach
788f1fcf48
Merge branch 'master' into disable-skin-editor-border 2021-05-19 21:52:29 +02:00
Salman Ahmed
21ca9c8431 Merge branch 'master' into beatmap-skin 2021-05-19 22:39:32 +03:00