mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 12:35:34 +08:00
Get rid of dublicated enum
This commit is contained in:
parent
b41f30c868
commit
8174f6be64
@ -17,7 +17,7 @@ namespace osu.Game.Skinning.Components
|
||||
public bool UsesFixedAnchor { get; set; }
|
||||
|
||||
[SettingSource("Font", "Font to use.")]
|
||||
public Bindable<DefaultFont> Font { get; } = new Bindable<DefaultFont>(DefaultFont.Torus);
|
||||
public Bindable<Typeface> Font { get; } = new Bindable<Typeface>(Typeface.Torus);
|
||||
|
||||
protected abstract void SetFont(FontUsage font);
|
||||
|
||||
@ -26,15 +26,7 @@ namespace osu.Game.Skinning.Components
|
||||
base.LoadComplete();
|
||||
Font.BindValueChanged(e =>
|
||||
{
|
||||
FontUsage f = e.NewValue switch
|
||||
{
|
||||
DefaultFont.Venera => OsuFont.Numeric,
|
||||
DefaultFont.Torus => OsuFont.Torus,
|
||||
DefaultFont.TorusAlt => OsuFont.TorusAlternate,
|
||||
DefaultFont.Inter => OsuFont.Inter,
|
||||
_ => OsuFont.Default
|
||||
};
|
||||
|
||||
FontUsage f = OsuFont.GetFont(e.NewValue);
|
||||
SetFont(f);
|
||||
}, true);
|
||||
}
|
||||
|
@ -1,18 +0,0 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Game.Skinning.Components;
|
||||
|
||||
namespace osu.Game.Skinning
|
||||
{
|
||||
/// <summary>
|
||||
/// The type of built-in font to use for <see cref="DefaultTextSkinComponent"/>.
|
||||
/// </summary>
|
||||
public enum DefaultFont
|
||||
{
|
||||
Venera,
|
||||
Torus,
|
||||
TorusAlt,
|
||||
Inter
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user