1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 08:23:00 +08:00

Fix skin editor potentially leaving game-wide masking in the wrong state

Just going with the simplest way to solve this.

Closes https://github.com/ppy/osu/issues/14769.
This commit is contained in:
Dean Herbert 2021-09-17 13:48:19 +09:00
parent 06ff4838fb
commit 1b13b74740

View File

@ -82,7 +82,7 @@ namespace osu.Game.Skinning.Editor
{
if (visibility.NewValue == Visibility.Visible)
{
target.Masking = true;
updateMasking();
target.AllowScaling = false;
target.RelativePositionAxes = Axes.Both;
@ -93,11 +93,14 @@ namespace osu.Game.Skinning.Editor
{
target.AllowScaling = true;
target.ScaleTo(1, SkinEditor.TRANSITION_DURATION, Easing.OutQuint).OnComplete(_ => target.Masking = false);
target.ScaleTo(1, SkinEditor.TRANSITION_DURATION, Easing.OutQuint).OnComplete(_ => updateMasking());
target.MoveToX(0f, SkinEditor.TRANSITION_DURATION, Easing.OutQuint);
}
}
private void updateMasking() =>
target.Masking = skinEditor.State.Value == Visibility.Visible;
public void OnReleased(KeyBindingReleaseEvent<GlobalAction> e)
{
}