Merge pull request #14775 from peppy/fix-skin-editor-masking

Fix skin editor potentially leaving game-wide masking in the wrong state
This commit is contained in:
Dan Balasescu 2021-09-17 14:20:22 +09:00 committed by GitHub
commit 9bacc0d50c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)
{
}