Commit Graph

1005 Commits

Author SHA1 Message Date
9e652715ce Expose the skin lookup layers of SkinManager to a property 2021-06-09 22:49:31 +03:00
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
cf40282f1f Convert LegacySkinTransformers to accept raw ISkins rather than a full ISkinSource 2021-06-09 22:49:31 +03:00
0cf7c56e7e Add fallback lookup support for DefaultSkin 2021-06-09 18:51:42 +09:00
2438c20d63 Fix SourceChanged not being correctly forwarded through LegacySkinTransformer 2021-06-09 17:56:07 +09:00
448e4e7ee5 Fix FindProvider calls on SkinProvidingContainer not considering disable flags
Closes #13394.
2021-06-09 16:19:04 +09:00
2484ccd50c Ensure scale x or y does not go below zero in SkinSelectionHandler.HandleScale 2021-06-08 11:49:25 -04:00
10b6b72909 Add guard clause to applyOrigins and rename parameter 2021-06-08 10:29:45 -04:00
d212918d67 Rename applyCustomAnchors to applyFixedAnchors for consistency with UsesFixedAnchor 2021-06-08 10:14:07 -04:00
2c88e6df8d Simplify applyClosestAnchor to one line by moving another guard clause 2021-06-08 10:09:48 -04:00
f22cc981d1 Move guard clause from checkAndApplyClosestAnchor to applyAnchor 2021-06-08 09:51:39 -04:00
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
01da73daf2 Refactor updateDrawableAnchorIfUsingClosest 2021-06-08 09:25:49 -04:00
6b127f50f2 Inline updateDrawableAnchorIfUsingClosest 2021-06-08 09:14:04 -04:00
dc50ae40b9 Rename OverridesClosestAnchor to UsesFixedAnchor 2021-06-08 08:28:42 -04:00
6017ef3825 Merge branch 'master' into fix-skin-sample-lookup 2021-06-08 17:37:36 +09:00
791855dfa0 Merge branch 'master' into legacy-skin-default-fallback 2021-06-08 16:54:26 +09:00
67135ce3db Add null check 2021-06-08 16:15:17 +09:00
e0f568aa8f Merge branch 'legacy-skin-default-fallback' into fix-skin-sample-lookup 2021-06-08 15:19:52 +09:00
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
27e3de3ea3 Add TODO about beatmap skin fallback support 2021-06-08 12:12:14 +09:00
06840d78cc Remove now unused method 2021-06-08 12:06:42 +09:00
2c1f22d7ae Refactor animation lookup to properly handle skins providing non-animated resources 2021-06-08 01:17:20 +09:00
e7e9197f03 Fix FindProvider not correctly checking legacy default in SkinManager 2021-06-08 00:42:50 +09:00
6d56e02ddb Add back incorrectly reverted animation handling logic
This reverts commit b904fa6615.
2021-06-08 00:17:01 +09:00
c0305343bc Fix FindProvider incorrectly returning LegacySkinTransformer itself 2021-06-07 23:23:44 +09:00
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
65f594f860 Rename applyAnchor to applyCustomAnchor 2021-06-07 05:08:18 -04:00
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
29fa4fdf57 Refactor unacceptable syntax 2021-06-07 01:08:39 -04:00
133d72a8c0 Rename UsingClosestAnchor
It is now "OverridesClosestAnchor". The logic is inverted accordingly.
2021-06-07 00:14:36 -04:00
f28916e30f Remove all UsingClosestAnchor() extension logic
It is replaced with ISkinnableDrawable.UsingClosestAnchor.
2021-06-07 00:04:53 -04:00
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
d26c9a66c2 Merge branch 'legacy-skin-default-fallback' into fix-skin-sample-lookup 2021-06-07 12:01:19 +09:00
6a456e53f4 Rename overly long method 2021-06-06 13:28:17 -04:00
888882ac63 Remove first-person comment 2021-06-06 13:27:13 -04:00
e10dfab2e8 Ensure scorebar marker lookup is performed on the source the background is retrieved from 2021-06-06 23:23:35 +09:00
da1c38d5a9 Uninvert logic of SkinnableInfo.UsingClosestAnchor
Also rename "IsUsingClosestAnchor" to simply "UsingClosestAnchor".
2021-06-06 10:13:35 -04:00
b5f145cfa9 Use null propagation for animation lookups 2021-06-06 23:01:37 +09:00
63346f6b75 Refactor getTieredComponent 2021-06-06 09:40:58 -04:00
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
4aee76456f Replace localised strings with static English 2021-06-06 05:34:32 -04:00
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
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
b87a5956dd Add fallback logic to SkinManager 2021-06-06 12:17:55 +09:00
39f99bf785 Move FindProvider to ISkinSource 2021-06-06 12:17:32 +09:00
ae2165b3be Fix incorrect xmldoc 2021-06-04 16:44:04 +09:00
37c8c63fc5 Ensure all frames in an animation are retrieved from the same skin 2021-06-04 16:18:04 +09:00
c065f761c7 Merge branch 'master' into legacy-skin-default-fallback 2021-06-02 19:08:52 +09:00
2e2281c7d2 Revert disabling taiko sample tests and fix logic 2021-06-01 18:57:19 +09:00