mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 16:12:54 +08:00
Move method below ctor
This commit is contained in:
parent
9593e66a96
commit
06eaba766b
@ -27,10 +27,6 @@ namespace osu.Game.Skinning
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
protected Drawable Drawable { get; private set; }
|
protected Drawable Drawable { get; private set; }
|
||||||
|
|
||||||
protected virtual T CreateDefault(string name) => createDefault(name);
|
|
||||||
|
|
||||||
private readonly Func<string, T> createDefault;
|
|
||||||
|
|
||||||
private readonly string componentName;
|
private readonly string componentName;
|
||||||
|
|
||||||
private readonly bool restrictSize;
|
private readonly bool restrictSize;
|
||||||
@ -57,6 +53,10 @@ namespace osu.Game.Skinning
|
|||||||
RelativeSizeAxes = Axes.Both;
|
RelativeSizeAxes = Axes.Both;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private readonly Func<string, T> createDefault;
|
||||||
|
|
||||||
|
protected virtual T CreateDefault(string name) => createDefault(name);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether to apply size restrictions (specified via <see cref="restrictSize"/>) to the default implementation.
|
/// Whether to apply size restrictions (specified via <see cref="restrictSize"/>) to the default implementation.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -15,8 +15,6 @@ namespace osu.Game.Skinning
|
|||||||
{
|
{
|
||||||
protected override bool ApplySizeRestrictionsToDefault => true;
|
protected override bool ApplySizeRestrictionsToDefault => true;
|
||||||
|
|
||||||
protected override Sprite CreateDefault(string name) => new Sprite { Texture = textures.Get(name) };
|
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private TextureStore textures { get; set; }
|
private TextureStore textures { get; set; }
|
||||||
|
|
||||||
@ -24,5 +22,7 @@ namespace osu.Game.Skinning
|
|||||||
: base(name, allowFallback, restrictSize)
|
: base(name, allowFallback, restrictSize)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override Sprite CreateDefault(string name) => new Sprite { Texture = textures.Get(name) };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user