mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
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:
@ -6,6 +6,7 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Rulesets;
|
||||
using OpenTK;
|
||||
@ -27,12 +28,14 @@ namespace osu.Game.Overlays.Settings
|
||||
|
||||
foreach (var ruleset in rulesets.AllRulesets)
|
||||
{
|
||||
modes.Add(new TextAwesome
|
||||
var icon = new ConstrainedIconContainer
|
||||
{
|
||||
Icon = ruleset.CreateInstance().Icon,
|
||||
Icon = ruleset.CreateInstance().CreateIcon(),
|
||||
Colour = Color4.Gray,
|
||||
TextSize = 20
|
||||
});
|
||||
Size = new Vector2(20),
|
||||
};
|
||||
|
||||
modes.Add(icon);
|
||||
}
|
||||
|
||||
Children = new Drawable[]
|
||||
|
Reference in New Issue
Block a user