1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-13 13:23:03 +08:00

Add basic textbox error handling

This commit is contained in:
Dean Herbert 2020-10-02 15:33:33 +09:00
parent 959c8730f6
commit 2698dc513f

View File

@ -61,10 +61,17 @@ namespace osu.Game.Screens.Edit.Timing
textBox.OnCommit += (sender, isNew) =>
{
if (!isNew)
return;
if (double.TryParse(sender.Text, out var newTime))
{
changeSelectedGroupTime(newTime);
}
else
{
SelectedGroup.TriggerChange();
}
};
SelectedGroup.BindValueChanged(group =>