mirror of
https://github.com/ppy/osu
synced 2024-12-27 09:23:15 +00:00
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:
commit
9bacc0d50c
@ -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)
|
||||
{
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user