Rename class to better match usage

This commit is contained in:
Dean Herbert
2019-08-11 16:15:44 +09:00
parent d55f9404da
commit 684c37bf05
2 changed files with 7 additions and 7 deletions

View File

@ -12,17 +12,17 @@ using osuTK;
namespace osu.Game.Graphics.UserInterface namespace osu.Game.Graphics.UserInterface
{ {
/// <summary> /// <summary>
/// A custom icon class for use with <see cref="ScreenTitle.CreateIcon()"/> /// A custom icon class for use with <see cref="ScreenTitle.CreateIcon()"/> based off a texture resource.
/// </summary> /// </summary>
public class ScreenTitleIcon : CompositeDrawable public class ScreenTitleTextureIcon : CompositeDrawable
{ {
private const float circle_allowance = 0.8f; private const float circle_allowance = 0.8f;
private readonly string icon; private readonly string textureName;
public ScreenTitleIcon(string icon) public ScreenTitleTextureIcon(string textureName)
{ {
this.icon = icon; this.textureName = textureName;
} }
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
@ -44,7 +44,7 @@ namespace osu.Game.Graphics.UserInterface
new Sprite new Sprite
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Texture = textures.Get(icon), Texture = textures.Get(textureName),
Size = new Vector2(circle_allowance), Size = new Vector2(circle_allowance),
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,

View File

@ -121,7 +121,7 @@ namespace osu.Game.Overlays.Changelog
AccentColour = colours.Violet; AccentColour = colours.Violet;
} }
protected override Drawable CreateIcon() => new ScreenTitleIcon(@"Icons/changelog"); protected override Drawable CreateIcon() => new ScreenTitleTextureIcon(@"Icons/changelog");
} }
} }
} }