Allow Rulesets to create a non-FontAwesome icon

This also
- Renames TextAwesome to SpriteIcon.
- Removes the default size of "20" from SpriteIcon (now defaults to the underlying texture size).
This commit is contained in:
Dean Herbert
2017-08-03 14:36:21 +09:00
parent d72a479d9d
commit 0d9ea97828
55 changed files with 317 additions and 187 deletions

View File

@ -17,7 +17,7 @@ namespace osu.Game.Overlays.Settings
{
public class SidebarButton : Container
{
private readonly TextAwesome drawableIcon;
private readonly SpriteIcon drawableIcon;
private readonly SpriteText headerText;
private readonly Box backgroundBox;
private readonly Box selectionIndicator;
@ -77,7 +77,7 @@ namespace osu.Game.Overlays.Settings
Width = Sidebar.DEFAULT_WIDTH,
RelativeSizeAxes = Axes.Y,
Colour = OsuColour.Gray(0.6f),
Children = new[]
Children = new Drawable[]
{
headerText = new OsuSpriteText
{
@ -85,11 +85,11 @@ namespace osu.Game.Overlays.Settings
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft,
},
drawableIcon = new TextAwesome
drawableIcon = new SpriteIcon
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
TextSize = 20
Size = new Vector2(20),
},
}
},