mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 17:13:06 +08:00
proxy backbutton instead
This commit is contained in:
parent
8220a51310
commit
38559685a9
@ -394,6 +394,16 @@ namespace osu.Game
|
|||||||
|
|
||||||
AddRange(new Drawable[]
|
AddRange(new Drawable[]
|
||||||
{
|
{
|
||||||
|
backButton = new BackButton
|
||||||
|
{
|
||||||
|
Anchor = Anchor.BottomLeft,
|
||||||
|
Origin = Anchor.BottomLeft,
|
||||||
|
Action = () =>
|
||||||
|
{
|
||||||
|
if ((screenStack.CurrentScreen as IOsuScreen)?.AllowBackButton == true)
|
||||||
|
screenStack.Exit();
|
||||||
|
}
|
||||||
|
},
|
||||||
new VolumeControlReceptor
|
new VolumeControlReceptor
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
@ -403,19 +413,10 @@ namespace osu.Game
|
|||||||
screenContainer = new ScalingContainer(ScalingMode.ExcludeOverlays)
|
screenContainer = new ScalingContainer(ScalingMode.ExcludeOverlays)
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Children = new Drawable[]
|
Children = new[]
|
||||||
{
|
{
|
||||||
screenStack = new OsuScreenStack { RelativeSizeAxes = Axes.Both },
|
screenStack = new OsuScreenStack { RelativeSizeAxes = Axes.Both },
|
||||||
backButton = new BackButton
|
backButton.CreateProxy(),
|
||||||
{
|
|
||||||
Anchor = Anchor.BottomLeft,
|
|
||||||
Origin = Anchor.BottomLeft,
|
|
||||||
Action = () =>
|
|
||||||
{
|
|
||||||
if ((screenStack.CurrentScreen as IOsuScreen)?.AllowBackButton == true)
|
|
||||||
screenStack.Exit();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
logoContainer = new Container { RelativeSizeAxes = Axes.Both },
|
logoContainer = new Container { RelativeSizeAxes = Axes.Both },
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user