Remove useless bindable from ArgonSongProgressBar

This commit is contained in:
Andrei Zavatski 2024-01-26 04:09:00 +03:00
parent baaf33d995
commit d2af05b30e

View File

@ -3,7 +3,6 @@
using System; using System;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Colour; using osu.Framework.Graphics.Colour;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
@ -52,23 +51,14 @@ namespace osu.Game.Screens.Play.HUD
set => CurrentNumber.Value = value; set => CurrentNumber.Value = value;
} }
public double TrackTime public double TrackTime { private get; set; }
{
private get => currentTrackTime.Value;
set => currentTrackTime.Value = value;
}
private double length => EndTime - StartTime; private double length => EndTime - StartTime;
private readonly BindableNumber<double> currentTrackTime;
public bool Interactive { get; set; } public bool Interactive { get; set; }
public ArgonSongProgressBar(float barHeight) public ArgonSongProgressBar(float barHeight)
{ {
currentTrackTime = new BindableDouble();
setupAlternateValue();
StartTime = 0; StartTime = 0;
EndTime = 1; EndTime = 1;
@ -107,13 +97,6 @@ namespace osu.Game.Screens.Play.HUD
}; };
} }
private void setupAlternateValue()
{
CurrentNumber.MaxValueChanged += v => currentTrackTime.MaxValue = v;
CurrentNumber.MinValueChanged += v => currentTrackTime.MinValue = v;
CurrentNumber.PrecisionChanged += v => currentTrackTime.Precision = v;
}
private float normalizedReference private float normalizedReference
{ {
get get