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

1120 Commits

Author SHA1 Message Date
Bartłomiej Dach
b1087d14f3
Merge branch 'master' into skin-editor-button-access 2021-07-22 22:49:44 +02:00
Dean Herbert
21053381c7 Fix skin editor potentially eating GlobalAction.Back when not displayed 2021-07-22 15:59:00 +09:00
Dean Herbert
3fd8de3b91 Fix skin editor's fake overlay potentially getting into a bad state 2021-07-22 15:57:47 +09:00
Dean Herbert
399c3b0be8 Rename property, reword xmldoc and improve readability of update code 2021-07-21 17:32:56 +09:00
ekrctb
1bff4373b3 Allow specifying flipping support of selection box different from scaling 2021-07-21 15:59:45 +09:00
Salman Ahmed
9d92b795fa Revert making ComboOffsets legacy and define BeatmapSkinComboIndex instead 2021-07-20 14:15:43 +03:00
Dean Herbert
16a2e63bd4 Use existing localisation 2021-07-20 19:44:02 +09:00
Dean Herbert
59457743e5 Move further to the right to avoid overlap with toolbox listing 2021-07-20 19:43:52 +09:00
Dean Herbert
9c4fbf45e9 Add the ability to enter and exit the skin editor via on-screen buttons 2021-07-20 19:36:12 +09:00
Salman Ahmed
554652b033 Merge branch 'refactor-combo-colour-retrieval' into legacy-beatmap-combo-offset 2021-07-20 10:11:52 +03:00
Salman Ahmed
1af230c48c Merge branch 'master' into refactor-combo-colour-retrieval 2021-07-20 10:08:25 +03:00
Dean Herbert
c18b8ca86c Add missing ToArray() call 2021-07-07 14:08:29 +09:00
Dean Herbert
ca791c2afa Remove unused using statement 2021-07-07 13:53:00 +09:00
Dean Herbert
35d4b12a4f Remove single local usage of AllSources 2021-07-07 13:52:52 +09:00
Dean Herbert
eb8b14a931 Reorder methods to make more sense 2021-07-07 13:51:51 +09:00
Dean Herbert
523546d8b6 Use List to guarantee lookup order 2021-07-06 22:51:56 +09:00
Dean Herbert
d75d67577a Fix regressed tests 2021-07-06 17:37:34 +09:00
Dean Herbert
cd4885e450 Add xmldoc and remove any question of how the intitial flow is being run 2021-07-06 17:18:45 +09:00
Dean Herbert
032c285ede Move private downwards 2021-07-06 17:07:29 +09:00
Dean Herbert
1232925f93 Make source manipulation methods protected 2021-07-06 17:06:00 +09:00
Dean Herbert
b4240d3ca4 Simplify lookups to avoid a second dictionary fetch 2021-07-06 17:04:59 +09:00
Dean Herbert
ec1224218c Localise source changed flow for better clarity 2021-07-06 16:57:19 +09:00
Dean Herbert
935fbe7cc6 Remove double fetch/binding of parent source 2021-07-06 16:51:29 +09:00
Dean Herbert
93ef783339 Remove BindableList usage 2021-07-06 16:40:23 +09:00
PercyDan54
e1c646b9b2
Remove redundant arguments 2021-07-05 23:52:39 +08:00
Dean Herbert
ec71deec51 Remove some mentions of "lazer"
I am aware there are more throughout the codebase but intentionally left
the remaining mentioned for one reason or another. The intention here is
to mainly change user-facing versioning to change the positioning of the
"lazer" term (to be where we would expect "cuttingedge" or "beta" to
be).
2021-07-04 12:41:27 +09:00
Dean Herbert
6e31c781bb
Merge pull request #13382 from ribbanya/clamp-skin-scale
Fix skin elements flipping when scaled below zero
2021-07-02 20:50:47 +09:00
aitani9
9b0fa6d3fc Make flipping reflect across the axes of the selection box 2021-07-01 15:38:38 -07:00
Dean Herbert
094cd31361
Merge pull request #13441 from frenzibyte/ruleset-resources-skin
Provide access to ruleset resources during `ISkinSource` lookups
2021-06-30 15:26:37 +09:00
Dan Balasescu
92fcf90768
Merge branch 'master' into import-early-checksum-abort 2021-06-28 19:29:08 +09:00
Salman Ahmed
66fc95c111 Use LastOrDefault instead 2021-06-28 12:43:58 +03:00
Salman Ahmed
7197998a10 Remove resolution to SkinManager and use pattern matching instead 2021-06-28 12:43:13 +03:00
Salman Ahmed
177bfe1234 Merge branch 'master' into ruleset-resources-skin 2021-06-28 11:16:37 +03:00
Salman Ahmed
779a1b322c
Add comment explaining insertion of ruleset skin before default skin
Co-authored-by: Dean Herbert <pe@ppy.sh>
2021-06-28 09:38:42 +03:00
Salman Ahmed
f598de4cdb ResourcesSkin -> ResourceStoreBackedSkin 2021-06-28 09:18:29 +03:00
Salman Ahmed
692f24437e Maintain ruleset resources skin across multiple source changes 2021-06-28 09:11:28 +03:00
Dean Herbert
f777741ca7 Simplify instantiation 2021-06-28 14:51:27 +09:00
Dean Herbert
e387feb1d6 Add inline comment mentioning why CreateChildDependencies is being used in this instance 2021-06-28 14:39:55 +09:00
Dean Herbert
fdd6778f36
Merge branch 'master' into fix-initial-ruleset-skin-loading 2021-06-28 14:35:34 +09:00
Dean Herbert
44f875b802 Bypass optimised existing check in SkinManager (due to custom hashing function) 2021-06-27 16:35:13 +09:00
Dean Herbert
d1f852d102 Make Populate abstract to avoid unnecessary base call async complexity 2021-06-27 14:29:02 +09:00
Salman Ahmed
e8e9fdd533 Dispose ResourcesSkin before clearing skin sources 2021-06-26 12:34:30 +03:00
Salman Ahmed
e5eea503db Remove finalizer logic from ResourcesSkin 2021-06-26 12:21:49 +03:00
Salman Ahmed
f07008a0a2 Fix RulesetSkinProvidingContainer potentially late in setting up skin sources 2021-06-25 10:05:51 +03:00
Salman Ahmed
a98b5618b8 Convert RulesetResourcesSkin to plain ResourcesSkin and pass non-null resources 2021-06-24 10:07:38 +03:00
Salman Ahmed
d484469906 Handle case where SkinManager sources aren't part of AllSources
In tests.
2021-06-23 10:44:23 +03:00
Salman Ahmed
53fa229880 Add ruleset resources skin before SkinManager.DefaultSkin 2021-06-23 10:09:25 +03:00
Salman Ahmed
2e6800f586 Enable NRT in RulesetResourcesSkin 2021-06-23 09:52:00 +03:00
Salman Ahmed
0db06c727b Dispose resource stores on finalizer 2021-06-23 09:41:45 +03:00
Salman Ahmed
ee84364d7c Resolve conflict issues 2021-06-22 20:38:24 +03:00
Salman Ahmed
896c1dc202 Merge branch 'master' into ruleset-resources-skin 2021-06-22 20:36:49 +03:00
Dean Herbert
4cb9c6a842
Merge pull request #13423 from frenzibyte/transformers-per-skin
Refactor ruleset skin transforming logic to be per-`ISkin` rather than one `ISkinSource`
2021-06-22 21:24:56 +09:00
Salman Ahmed
71e2815e7e
Update and improve code documentation
Co-authored-by: Dean Herbert <pe@ppy.sh>
2021-06-22 12:05:17 +03:00
Salman Ahmed
c1284940e1 Fix potentially providing the same skin instance twice in AllSources 2021-06-22 10:49:37 +03:00
Salman Ahmed
d0cdc07b11 Reuse AllSources when looking up on FindProvider 2021-06-22 10:49:21 +03:00
Dean Herbert
4b3165084d Move scoped functionality into local function 2021-06-22 16:40:56 +09:00
Dean Herbert
ffac32a848 Reword xmldoc 2021-06-22 16:40:48 +09:00
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