Merge branch 'master' into editor-timing-screen-change-handling

This commit is contained in:
Dan Balasescu
2020-10-05 15:40:43 +09:00
committed by GitHub
47 changed files with 306 additions and 141 deletions

View File

@ -18,6 +18,8 @@ namespace osu.Game.Screens.Edit.Timing
{
private LabelledTextBox textBox;
private TriangleButton button;
[Resolved]
protected Bindable<ControlPointGroup> SelectedGroup { get; private set; }
@ -52,7 +54,7 @@ namespace osu.Game.Screens.Edit.Timing
{
Label = "Time"
},
new TriangleButton
button = new TriangleButton
{
Text = "Use current time",
RelativeSizeAxes = Axes.X,
@ -82,18 +84,22 @@ namespace osu.Game.Screens.Edit.Timing
if (group.NewValue == null)
{
textBox.Text = string.Empty;
textBox.Current.Disabled = true;
button.Enabled.Value = false;
return;
}
textBox.Current.Disabled = false;
button.Enabled.Value = true;
textBox.Text = $"{group.NewValue.Time:n0}";
}, true);
}
private void changeSelectedGroupTime(in double time)
{
if (time == SelectedGroup.Value.Time)
if (SelectedGroup.Value == null || time == SelectedGroup.Value.Time)
return;
changeHandler?.BeginChange();