mirror of
https://github.com/ppy/osu
synced 2025-03-11 05:49:12 +00: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:
parent
06ff4838fb
commit
1b13b74740
@ -82,7 +82,7 @@ namespace osu.Game.Skinning.Editor
|
|||||||
{
|
{
|
||||||
if (visibility.NewValue == Visibility.Visible)
|
if (visibility.NewValue == Visibility.Visible)
|
||||||
{
|
{
|
||||||
target.Masking = true;
|
updateMasking();
|
||||||
target.AllowScaling = false;
|
target.AllowScaling = false;
|
||||||
target.RelativePositionAxes = Axes.Both;
|
target.RelativePositionAxes = Axes.Both;
|
||||||
|
|
||||||
@ -93,11 +93,14 @@ namespace osu.Game.Skinning.Editor
|
|||||||
{
|
{
|
||||||
target.AllowScaling = true;
|
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);
|
target.MoveToX(0f, SkinEditor.TRANSITION_DURATION, Easing.OutQuint);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void updateMasking() =>
|
||||||
|
target.Masking = skinEditor.State.Value == Visibility.Visible;
|
||||||
|
|
||||||
public void OnReleased(KeyBindingReleaseEvent<GlobalAction> e)
|
public void OnReleased(KeyBindingReleaseEvent<GlobalAction> e)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user