Focus textbox on control point popovers

This commit is contained in:
Salman Ahmed 2022-05-11 09:55:34 +03:00
parent 24432dffc4
commit 96db530de6
2 changed files with 12 additions and 0 deletions

View File

@ -122,6 +122,12 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
beatmap.EndChange();
});
}
protected override void LoadComplete()
{
base.LoadComplete();
ScheduleAfterChildren(() => GetContainingInputManager().ChangeFocus(sliderVelocitySlider));
}
}
}
}

View File

@ -126,6 +126,12 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
volume.Current.BindValueChanged(val => updateVolumeFor(relevantObjects, val.NewValue));
}
protected override void LoadComplete()
{
base.LoadComplete();
ScheduleAfterChildren(() => GetContainingInputManager().ChangeFocus(volume));
}
private static string? getCommonBank(SampleControlPoint[] relevantControlPoints) => relevantControlPoints.Select(point => point.SampleBank).Distinct().Count() == 1 ? relevantControlPoints.First().SampleBank : null;
private static int? getCommonVolume(SampleControlPoint[] relevantControlPoints) => relevantControlPoints.Select(point => point.SampleVolume).Distinct().Count() == 1 ? (int?)relevantControlPoints.First().SampleVolume : null;