mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 17:52:56 +08:00
Fixed quitting not working
This commit is contained in:
parent
ea204ad606
commit
0d53d3c4ff
@ -161,8 +161,8 @@ namespace osu.Game.Overlays.Pause
|
|||||||
Height = button_height,
|
Height = button_height,
|
||||||
Action = delegate
|
Action = delegate
|
||||||
{
|
{
|
||||||
Hide();
|
|
||||||
OnRetry?.Invoke();
|
OnRetry?.Invoke();
|
||||||
|
Hide();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
new QuitButton
|
new QuitButton
|
||||||
@ -173,8 +173,8 @@ namespace osu.Game.Overlays.Pause
|
|||||||
Height = button_height,
|
Height = button_height,
|
||||||
Action = delegate
|
Action = delegate
|
||||||
{
|
{
|
||||||
Hide();
|
|
||||||
OnQuit?.Invoke();
|
OnQuit?.Invoke();
|
||||||
|
Hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -199,9 +199,9 @@ namespace osu.Game.Overlays.Pause
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void resume()
|
private void resume()
|
||||||
{
|
{
|
||||||
Hide();
|
|
||||||
OnResume?.Invoke();
|
OnResume?.Invoke();
|
||||||
|
Hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
public PauseOverlay()
|
public PauseOverlay()
|
||||||
|
@ -26,6 +26,7 @@ using osu.Game.Overlays.Pause;
|
|||||||
using osu.Framework.Configuration;
|
using osu.Framework.Configuration;
|
||||||
using System;
|
using System;
|
||||||
using OpenTK.Graphics;
|
using OpenTK.Graphics;
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Play
|
namespace osu.Game.Screens.Play
|
||||||
{
|
{
|
||||||
@ -261,7 +262,7 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
protected override bool OnExiting(GameMode next)
|
protected override bool OnExiting(GameMode next)
|
||||||
{
|
{
|
||||||
if (!canPause) return true;
|
if (pauseOverlay.State != Visibility.Visible && !canPause) return true;
|
||||||
|
|
||||||
if (!IsPaused && sourceClock.IsRunning) // For if the user presses escape quickly when entering the map
|
if (!IsPaused && sourceClock.IsRunning) // For if the user presses escape quickly when entering the map
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user