mirror of
https://github.com/ppy/osu.git
synced 2025-01-19 02:52:54 +08:00
Simplify existing code
This commit is contained in:
parent
8c40b80813
commit
1f425c3be8
@ -44,9 +44,9 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
protected override void LoadComplete()
|
||||||
private void load()
|
|
||||||
{
|
{
|
||||||
|
base.LoadComplete();
|
||||||
mc.ToggleVisibility();
|
mc.ToggleVisibility();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -147,7 +147,7 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
|
|
||||||
private int calculateBeatCount(TimingControlPoint current)
|
private int calculateBeatCount(TimingControlPoint current)
|
||||||
{
|
{
|
||||||
if (timingPoints.IndexOf(current) + 1 == timingPoints.Count)
|
if (timingPoints[timingPoints.Count - 1] == current)
|
||||||
return (int)Math.Ceiling((Beatmap.Value.Track.Length - current.Time) / current.BeatLength);
|
return (int)Math.Ceiling((Beatmap.Value.Track.Length - current.Time) / current.BeatLength);
|
||||||
|
|
||||||
return (int)Math.Ceiling((getNextTimingPoint(current).Time - current.Time) / current.BeatLength);
|
return (int)Math.Ceiling((getNextTimingPoint(current).Time - current.Time) / current.BeatLength);
|
||||||
@ -177,16 +177,9 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
|
|
||||||
private readonly OsuSpriteText valueText;
|
private readonly OsuSpriteText valueText;
|
||||||
|
|
||||||
private float? value;
|
|
||||||
public float Value
|
public float Value
|
||||||
{
|
{
|
||||||
set
|
set { valueText.Text = value.ToString(); }
|
||||||
{
|
|
||||||
if (value == this.value) return;
|
|
||||||
this.value = value;
|
|
||||||
|
|
||||||
valueText.Text = value.ToString(CultureInfo.CurrentCulture);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public InfoString(string header)
|
public InfoString(string header)
|
||||||
|
Loading…
Reference in New Issue
Block a user