1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 16:32:54 +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 BindableDouble timeRangeBindable;
private SpriteText timeRangeText; private SpriteText timeRangeText;
private SpriteText bottomLabel;
public override void Reset() public override void Reset()
{ {
@ -49,8 +50,8 @@ namespace osu.Desktop.VisualTests.Tests
}); });
timeRange.Current.BindTo(timeRangeBindable); timeRange.Current.BindTo(timeRangeBindable);
timeRangeBindable.ValueChanged += v => timeRangeText.Text = $"Visible Range: {v:0.#}"; timeRangeBindable.ValueChanged += v => timeRangeText.Text = $"Visible Range: {v:#,#.#}";
timeRangeBindable.TriggerChange(); timeRangeBindable.ValueChanged += v => bottomLabel.Text = $"t minus {v:#,#}";
Add(new Drawable[] Add(new Drawable[]
{ {
@ -70,11 +71,26 @@ namespace osu.Desktop.VisualTests.Tests
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
VisibleTimeRange = timeRangeBindable 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())); adjustmentCollection.Add(new TestSpeedAdjustmentContainer(new MultiplierControlPoint()));
AddStep("Add hit object", () => adjustmentCollection.Add(new TestDrawableHitObject(new HitObject { StartTime = Time.Current + 2000 }))); AddStep("Add hit object", () => adjustmentCollection.Add(new TestDrawableHitObject(new HitObject { StartTime = Time.Current + 2000 })));