mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 00:02:56 +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; }
|
public bool UsesFixedAnchor { get; set; }
|
||||||
|
|
||||||
[SettingSource("Font", "Font to use.")]
|
[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);
|
protected abstract void SetFont(FontUsage font);
|
||||||
|
|
||||||
@ -26,15 +26,7 @@ namespace osu.Game.Skinning.Components
|
|||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
Font.BindValueChanged(e =>
|
Font.BindValueChanged(e =>
|
||||||
{
|
{
|
||||||
FontUsage f = e.NewValue switch
|
FontUsage f = OsuFont.GetFont(e.NewValue);
|
||||||
{
|
|
||||||
DefaultFont.Venera => OsuFont.Numeric,
|
|
||||||
DefaultFont.Torus => OsuFont.Torus,
|
|
||||||
DefaultFont.TorusAlt => OsuFont.TorusAlternate,
|
|
||||||
DefaultFont.Inter => OsuFont.Inter,
|
|
||||||
_ => OsuFont.Default
|
|
||||||
};
|
|
||||||
|
|
||||||
SetFont(f);
|
SetFont(f);
|
||||||
}, true);
|
}, 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