Merge pull request #15340 from peppy/add-number-setting-source-test

Add visual test for `SettingsNumberBox` usage in settings source context
This commit is contained in:
Dan Balasescu 2021-10-28 18:19:45 +09:00 committed by GitHub
commit 6e79a0947a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,6 +6,7 @@ using osu.Framework.Bindables;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Game.Configuration; using osu.Game.Configuration;
using osu.Game.Overlays.Settings;
using osuTK; using osuTK;
namespace osu.Game.Tests.Visual.Settings namespace osu.Game.Tests.Visual.Settings
@ -58,6 +59,13 @@ namespace osu.Game.Tests.Visual.Settings
Default = string.Empty, Default = string.Empty,
Value = "Sample text" Value = "Sample text"
}; };
[SettingSource("Sample number textbox", "Textbox number entry", SettingControlType = typeof(SettingsNumberBox))]
public Bindable<int?> IntTextboxBindable { get; } = new Bindable<int?>
{
Default = null,
Value = null
};
} }
private enum TestEnum private enum TestEnum