1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 15:07:44 +08:00

Add labels to playfield area

This commit is contained in:
Dean Herbert 2017-06-15 14:40:30 +09:00
parent 149eaa64de
commit 021019648e

View File

@ -23,6 +23,7 @@ namespace osu.Desktop.VisualTests.Tests
private BindableDouble timeRangeBindable;
private SpriteText timeRangeText;
private SpriteText bottomLabel;
public override void Reset()
{
@ -49,8 +50,8 @@ namespace osu.Desktop.VisualTests.Tests
});
timeRange.Current.BindTo(timeRangeBindable);
timeRangeBindable.ValueChanged += v => timeRangeText.Text = $"Visible Range: {v:0.#}";
timeRangeBindable.TriggerChange();
timeRangeBindable.ValueChanged += v => timeRangeText.Text = $"Visible Range: {v:#,#.#}";
timeRangeBindable.ValueChanged += v => bottomLabel.Text = $"t minus {v:#,#}";
Add(new Drawable[]
{
@ -70,11 +71,26 @@ namespace osu.Desktop.VisualTests.Tests
{
RelativeSizeAxes = Axes.Both,
VisibleTimeRange = timeRangeBindable
}
},
new SpriteText
{
Text = "t minus 0",
TextSize = 14,
Anchor = Anchor.TopRight,
},
bottomLabel = new SpriteText
{
Text = "t minus x",
TextSize = 14,
Anchor = Anchor.BottomRight,
Origin = Anchor.BottomLeft,
},
}
}
});
timeRangeBindable.TriggerChange();
adjustmentCollection.Add(new TestSpeedAdjustmentContainer(new MultiplierControlPoint()));
AddStep("Add hit object", () => adjustmentCollection.Add(new TestDrawableHitObject(new HitObject { StartTime = Time.Current + 2000 })));