mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 21:02:55 +08:00
Rename to IsUserPaused
This commit is contained in:
parent
9986178bf4
commit
b225b2eb39
@ -55,7 +55,7 @@ namespace osu.Game.Overlays
|
||||
private Container dragContainer;
|
||||
private Container playerContainer;
|
||||
|
||||
public bool UserRequestedPause { get; private set; }
|
||||
public bool IsUserPaused { get; private set; }
|
||||
|
||||
[Resolved]
|
||||
private Bindable<WorkingBeatmap> beatmap { get; set; }
|
||||
@ -159,7 +159,7 @@ namespace osu.Game.Overlays
|
||||
Origin = Anchor.Centre,
|
||||
Scale = new Vector2(1.4f),
|
||||
IconScale = new Vector2(1.4f),
|
||||
Action = play,
|
||||
Action = togglePause,
|
||||
Icon = FontAwesome.Regular.PlayCircle,
|
||||
},
|
||||
nextButton = new MusicIconButton
|
||||
@ -278,7 +278,7 @@ namespace osu.Game.Overlays
|
||||
}
|
||||
}
|
||||
|
||||
private void play()
|
||||
private void togglePause()
|
||||
{
|
||||
var track = current?.Track;
|
||||
|
||||
@ -289,12 +289,16 @@ namespace osu.Game.Overlays
|
||||
return;
|
||||
}
|
||||
|
||||
UserRequestedPause = track.IsRunning;
|
||||
|
||||
if (track.IsRunning)
|
||||
{
|
||||
IsUserPaused = true;
|
||||
track.Stop();
|
||||
}
|
||||
else
|
||||
{
|
||||
track.Start();
|
||||
IsUserPaused = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void prev()
|
||||
|
@ -193,7 +193,7 @@ namespace osu.Game.Screens.Menu
|
||||
//we may have consumed our preloaded instance, so let's make another.
|
||||
preloadSongSelect();
|
||||
|
||||
if (Beatmap.Value.Track != null && !musicController.UserRequestedPause)
|
||||
if (Beatmap.Value.Track != null && !musicController.IsUserPaused)
|
||||
Beatmap.Value.Track.Start();
|
||||
}
|
||||
|
||||
|
@ -573,7 +573,7 @@ namespace osu.Game.Screens.Select
|
||||
{
|
||||
Track track = Beatmap.Value.Track;
|
||||
|
||||
if ((!track.IsRunning || restart) && !musicController.UserRequestedPause)
|
||||
if ((!track.IsRunning || restart) && !musicController.IsUserPaused)
|
||||
{
|
||||
track.RestartPoint = Beatmap.Value.Metadata.PreviewTime;
|
||||
track.Restart();
|
||||
|
Loading…
Reference in New Issue
Block a user