mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Rename to IsUserPaused
This commit is contained in:
@ -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()
|
||||
|
Reference in New Issue
Block a user