mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 03:25:11 +08:00
Centralise MakeCurrent call
This commit is contained in:
parent
c532f77657
commit
14453da1d2
@ -319,6 +319,8 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
if (this.IsCurrentScreen())
|
if (this.IsCurrentScreen())
|
||||||
performImmediateExit();
|
performImmediateExit();
|
||||||
|
else
|
||||||
|
this.MakeCurrent();
|
||||||
}
|
}
|
||||||
|
|
||||||
private ScheduledDelegate completionProgressDelegate;
|
private ScheduledDelegate completionProgressDelegate;
|
||||||
|
@ -5,7 +5,6 @@ using osu.Framework.Allocation;
|
|||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Framework.Screens;
|
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using osu.Game.Screens.Play;
|
using osu.Game.Screens.Play;
|
||||||
@ -49,11 +48,7 @@ namespace osu.Game.Screens.Ranking.Pages
|
|||||||
background.Colour = colours.Green;
|
background.Colour = colours.Green;
|
||||||
|
|
||||||
if (player != null)
|
if (player != null)
|
||||||
Action = () =>
|
Action = () => player.Restart();
|
||||||
{
|
|
||||||
player.Restart();
|
|
||||||
player.MakeCurrent();
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -262,7 +262,6 @@ namespace osu.Game.Screens.Ranking
|
|||||||
if (!this.IsCurrentScreen()) return;
|
if (!this.IsCurrentScreen()) return;
|
||||||
|
|
||||||
player.Restart();
|
player.Restart();
|
||||||
player.MakeCurrent();
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user