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

@ -30,14 +30,14 @@ namespace osu.Game.Overlays.Dialog
private readonly Container content;
private readonly Container ring;
private readonly FillFlowContainer<PopupDialogButton> buttonsContainer;
private readonly TextAwesome iconText;
private readonly SpriteIcon icon;
private readonly SpriteText header;
private readonly SpriteText body;
public FontAwesome Icon
{
get { return iconText.Icon; }
set { iconText.Icon = value; }
get { return icon.Icon; }
set { icon.Icon = value; }
}
public string HeaderText
@ -205,12 +205,12 @@ namespace osu.Game.Overlays.Dialog
RelativeSizeAxes = Axes.Both,
Colour = Color4.Black.Opacity(0),
},
iconText = new TextAwesome
icon = new SpriteIcon
{
Origin = Anchor.Centre,
Anchor = Anchor.Centre,
Icon = FontAwesome.fa_close,
TextSize = 50,
Size = new Vector2(50),
},
},
},