mirror of
https://github.com/ppy/osu.git
synced 2025-02-08 09:42:55 +08:00
Fix results screen sounds persisting after exit
This commit is contained in:
parent
d3b233b08f
commit
cf2d0e6911
@ -64,6 +64,7 @@ namespace osu.Game.Screens.Ranking
|
|||||||
|
|
||||||
private Drawable bottomPanel = null!;
|
private Drawable bottomPanel = null!;
|
||||||
private Container<ScorePanel> detachedPanelContainer = null!;
|
private Container<ScorePanel> detachedPanelContainer = null!;
|
||||||
|
private AudioContainer audioContainer = null!;
|
||||||
|
|
||||||
private bool lastFetchCompleted;
|
private bool lastFetchCompleted;
|
||||||
|
|
||||||
@ -100,76 +101,80 @@ namespace osu.Game.Screens.Ranking
|
|||||||
|
|
||||||
popInSample = audio.Samples.Get(@"UI/overlay-pop-in");
|
popInSample = audio.Samples.Get(@"UI/overlay-pop-in");
|
||||||
|
|
||||||
InternalChild = new PopoverContainer
|
InternalChild = audioContainer = new AudioContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Child = new GridContainer
|
Child = new PopoverContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Content = new[]
|
Child = new GridContainer
|
||||||
{
|
{
|
||||||
new Drawable[]
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Content = new[]
|
||||||
{
|
{
|
||||||
VerticalScrollContent = new VerticalScrollContainer
|
new Drawable[]
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
VerticalScrollContent = new VerticalScrollContainer
|
||||||
ScrollbarVisible = false,
|
|
||||||
Child = new Container
|
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
ScrollbarVisible = false,
|
||||||
|
Child = new Container
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
StatisticsPanel = createStatisticsPanel().With(panel =>
|
||||||
|
{
|
||||||
|
panel.RelativeSizeAxes = Axes.Both;
|
||||||
|
panel.Score.BindTarget = SelectedScore;
|
||||||
|
}),
|
||||||
|
ScorePanelList = new ScorePanelList
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
SelectedScore = { BindTarget = SelectedScore },
|
||||||
|
PostExpandAction = () => StatisticsPanel.ToggleVisibility()
|
||||||
|
},
|
||||||
|
detachedPanelContainer = new Container<ScorePanel>
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
new[]
|
||||||
|
{
|
||||||
|
bottomPanel = new Container
|
||||||
|
{
|
||||||
|
Anchor = Anchor.BottomLeft,
|
||||||
|
Origin = Anchor.BottomLeft,
|
||||||
|
RelativeSizeAxes = Axes.X,
|
||||||
|
Height = TwoLayerButton.SIZE_EXTENDED.Y,
|
||||||
|
Alpha = 0,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
StatisticsPanel = createStatisticsPanel().With(panel =>
|
new Box
|
||||||
{
|
|
||||||
panel.RelativeSizeAxes = Axes.Both;
|
|
||||||
panel.Score.BindTarget = SelectedScore;
|
|
||||||
}),
|
|
||||||
ScorePanelList = new ScorePanelList
|
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
SelectedScore = { BindTarget = SelectedScore },
|
Colour = Color4Extensions.FromHex("#333")
|
||||||
PostExpandAction = () => StatisticsPanel.ToggleVisibility()
|
|
||||||
},
|
},
|
||||||
detachedPanelContainer = new Container<ScorePanel>
|
buttons = new FillFlowContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
AutoSizeAxes = Axes.Both,
|
||||||
|
Spacing = new Vector2(5),
|
||||||
|
Direction = FillDirection.Horizontal
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
},
|
|
||||||
new[]
|
|
||||||
{
|
|
||||||
bottomPanel = new Container
|
|
||||||
{
|
|
||||||
Anchor = Anchor.BottomLeft,
|
|
||||||
Origin = Anchor.BottomLeft,
|
|
||||||
RelativeSizeAxes = Axes.X,
|
|
||||||
Height = TwoLayerButton.SIZE_EXTENDED.Y,
|
|
||||||
Alpha = 0,
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
new Box
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
Colour = Color4Extensions.FromHex("#333")
|
|
||||||
},
|
|
||||||
buttons = new FillFlowContainer
|
|
||||||
{
|
|
||||||
Anchor = Anchor.Centre,
|
|
||||||
Origin = Anchor.Centre,
|
|
||||||
AutoSizeAxes = Axes.Both,
|
|
||||||
Spacing = new Vector2(5),
|
|
||||||
Direction = FillDirection.Horizontal
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
RowDimensions = new[]
|
||||||
|
{
|
||||||
|
new Dimension(),
|
||||||
|
new Dimension(GridSizeMode.AutoSize)
|
||||||
}
|
}
|
||||||
},
|
|
||||||
RowDimensions = new[]
|
|
||||||
{
|
|
||||||
new Dimension(),
|
|
||||||
new Dimension(GridSizeMode.AutoSize)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -330,6 +335,8 @@ namespace osu.Game.Screens.Ranking
|
|||||||
|
|
||||||
if (!skipExitTransition)
|
if (!skipExitTransition)
|
||||||
this.FadeOut(100);
|
this.FadeOut(100);
|
||||||
|
|
||||||
|
audioContainer.Volume.Value = 0;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user