mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Rename class to better match usage
This commit is contained in:
@ -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,
|
@ -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");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user