mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
MusicController regression fixes.
This commit is contained in:
@ -7,6 +7,7 @@ using osu.Framework.Graphics.Containers;
|
|||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Framework.Graphics.Transforms;
|
using osu.Framework.Graphics.Transforms;
|
||||||
using osu.Framework.Input;
|
using osu.Framework.Input;
|
||||||
|
using OpenTK;
|
||||||
|
|
||||||
namespace osu.Game.Overlays
|
namespace osu.Game.Overlays
|
||||||
{
|
{
|
||||||
@ -17,7 +18,7 @@ namespace osu.Game.Overlays
|
|||||||
public Action<float> SeekRequested;
|
public Action<float> SeekRequested;
|
||||||
private bool isDragging;
|
private bool isDragging;
|
||||||
|
|
||||||
private bool enabled;
|
private bool enabled = true;
|
||||||
public bool IsEnabled
|
public bool IsEnabled
|
||||||
{
|
{
|
||||||
get { return enabled; }
|
get { return enabled; }
|
||||||
@ -62,6 +63,7 @@ namespace osu.Game.Overlays
|
|||||||
|
|
||||||
private void updatePosition(float position)
|
private void updatePosition(float position)
|
||||||
{
|
{
|
||||||
|
position = MathHelper.Clamp(position, 0, 1);
|
||||||
fill.TransformTo(fill.Width, position, 100, EasingTypes.OutQuint, new TransformWidth());
|
fill.TransformTo(fill.Width, position, 100, EasingTypes.OutQuint, new TransformWidth());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -237,7 +237,7 @@ namespace osu.Game.Overlays
|
|||||||
|
|
||||||
if (current?.TrackLoaded ?? false)
|
if (current?.TrackLoaded ?? false)
|
||||||
{
|
{
|
||||||
progress.UpdatePosition((float)(current.Track.CurrentTime / current.Track.Length));
|
progress.UpdatePosition(current.Track.Length == 0 ? 0 : (float)(current.Track.CurrentTime / current.Track.Length));
|
||||||
playButton.Icon = current.Track.IsRunning ? FontAwesome.fa_pause_circle_o : FontAwesome.fa_play_circle_o;
|
playButton.Icon = current.Track.IsRunning ? FontAwesome.fa_pause_circle_o : FontAwesome.fa_play_circle_o;
|
||||||
|
|
||||||
if (current.Track.HasCompleted && !current.Track.Looping) next();
|
if (current.Track.HasCompleted && !current.Track.Looping) next();
|
||||||
|
Reference in New Issue
Block a user