From f0070eecf10ce1fe7193e973eee20ae1720e9a12 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 2 Oct 2023 20:09:39 +0900 Subject: [PATCH] Add rotation support for very old skins --- .../Resources/old-skin/reversearrow.png | Bin 0 -> 4853 bytes .../Skinning/Legacy/LegacyReverseArrow.cs | 26 ++++++++++++++---- 2 files changed, 21 insertions(+), 5 deletions(-) create mode 100644 osu.Game.Rulesets.Osu.Tests/Resources/old-skin/reversearrow.png diff --git a/osu.Game.Rulesets.Osu.Tests/Resources/old-skin/reversearrow.png b/osu.Game.Rulesets.Osu.Tests/Resources/old-skin/reversearrow.png new file mode 100644 index 0000000000000000000000000000000000000000..7ebdec37d356490d018f711ae525abb3250be3fd GIT binary patch literal 4853 zcmbtY_d6S2)K3TvF=AJY#9lQ+X=~T6O-qYfvDz9{dqfawR;=11ZH=O}s)``Awptzb zh+1DWsG^iN?|<+<&wHP9@A=`LAMUyLbI$pkn`myT&qxoW2LJ$!h6Xy86pi`c38tm2 zpVgg*D2h8k*EYb)*F7NE+20MIh4OWALl}BHd$?J;Iio_K4!EfT0IWHNI$G8tGusYy ze%89MU3(B%07OSunwYKw;u4JEO|ne7^3o{OyjsNNlUYlR^p^>T`RpD`i6LrpagI4i z?BFU(8YW&C2kA~?H9lfU~o91h-_28Sn)_H7H3 zH^njMCDtdJH*Vb6j_2`lI$R(1Pz(Qq5^7K1Blti;gpOh~lp|}_G`rK%)6-K^T8fF1MIbOHxpL8J z=j6|0P(SFR=waPVjWGGI4wMDKXp;-%U{*gt2zlVx1m)!X=7#f-%8QZ5^XI(}3*p-d5Ziwu*NI}%r9ohCT zMVdlYRaLgy+S)>f35o@2a1C`SdHH%xR>Q{t=6j&)1*rwmk!OFD&SFf9Zq^TEiapE3 z)Ee@n{5RirYco_Pakj3G$nh_eM-;H&fX875KO#ReY97C{`+5$ znF8HIUCfPVYsBQV^6|7@!2VI{a> z5H&%;Ziy)B;jZJws8IzZvLy(rWAJKJML71O)H3}HLM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E$;18e55$fvMMb2E7-KYTlA=W1z2uv0>RFt{I@~KfeoUdMlD#KPi|1 zjzwarHwzu+PH#V=4K=E``8`!wlI}Y-+}^*iU@{j&;r^XJqOOFJH;0ehOwMTkWgB#t zI7FbTi(SkinConfiguration.LegacySetting.Version)?.Value <= 1; } protected override void LoadComplete() @@ -76,11 +80,23 @@ private void updateStateTransforms(DrawableHitObject hitObject, ArmedState state switch (state) { case ArmedState.Idle: - // TODO: rotate slightly if Version < 1 (aka UseNewLayout) - InternalChild.ScaleTo(1.3f, move_out_duration, Easing.Out) - .Then() - .ScaleTo(1f, move_in_duration, Easing.Out) - .Loop(total - (move_in_duration + move_out_duration)); + if (shouldRotate) + { + InternalChild.ScaleTo(1.3f, move_out_duration) + .RotateTo(5.625f) + .Then() + .ScaleTo(1f, move_in_duration) + .RotateTo(-5.625f, move_in_duration) + .Loop(total - (move_in_duration + move_out_duration)); + } + else + { + InternalChild.ScaleTo(1.3f) + .Then() + .ScaleTo(1f, move_in_duration) + .Loop(total - (move_in_duration + move_out_duration)); + } + break; } }