mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 14:17:26 +08:00
Move OsuSettingsNumberBox
into SettingsNumberBox
This commit is contained in:
parent
c728f673d6
commit
b79d57b68c
@ -2,16 +2,20 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
|
||||
namespace osu.Game.Overlays.Settings
|
||||
{
|
||||
public class SettingsNumberBox : SettingsItem<string>
|
||||
{
|
||||
protected override Drawable CreateControl() => new OsuNumberBox
|
||||
protected override Drawable CreateControl() => new OsuSettingsNumberBox
|
||||
{
|
||||
Margin = new MarginPadding { Top = 5 },
|
||||
RelativeSizeAxes = Axes.X,
|
||||
};
|
||||
|
||||
public class OsuSettingsNumberBox : SettingsTextBox.OsuSettingsTextBox
|
||||
{
|
||||
protected override bool CanAddCharacter(char character) => char.IsNumber(character);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -56,10 +56,5 @@ namespace osu.Game.Overlays.Settings
|
||||
BorderColour = HasFocus ? borderColourFocused : borderColourUnfocused;
|
||||
}
|
||||
}
|
||||
|
||||
public class OsuSettingsNumberBox : OsuSettingsTextBox
|
||||
{
|
||||
protected override bool CanAddCharacter(char character) => char.IsNumber(character);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ namespace osu.Game.Rulesets.Mods
|
||||
}
|
||||
}
|
||||
|
||||
private readonly SettingsTextBox.OsuSettingsNumberBox seedNumberBox;
|
||||
private readonly SettingsNumberBox.OsuSettingsNumberBox seedNumberBox;
|
||||
|
||||
public SeedControl()
|
||||
{
|
||||
@ -75,7 +75,7 @@ namespace osu.Game.Rulesets.Mods
|
||||
{
|
||||
new Drawable[]
|
||||
{
|
||||
seedNumberBox = new SettingsTextBox.OsuSettingsNumberBox
|
||||
seedNumberBox = new SettingsNumberBox.OsuSettingsNumberBox
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
CommitOnFocusLost = true
|
||||
|
Loading…
Reference in New Issue
Block a user