Make settings section icons actual drawables.

This commit is contained in:
Lucas A
2020-04-25 20:35:46 +02:00
parent aaa0f908d5
commit a756486a4d
13 changed files with 72 additions and 17 deletions

View File

@ -13,9 +13,13 @@ namespace osu.Game.Overlays.Settings.Sections
{
public override string Header => "Audio";
public override IEnumerable<string> FilterTerms => base.FilterTerms.Concat(new[] { "sound" });
public override Drawable CreateIcon() => new SpriteIcon
{
RelativeSizeAxes = Axes.Both,
Icon = FontAwesome.Solid.VolumeUp
};
public override IconUsage Icon => FontAwesome.Solid.VolumeUp;
public override IEnumerable<string> FilterTerms => base.FilterTerms.Concat(new[] { "sound" });
public AudioSection()
{

View File

@ -10,7 +10,12 @@ namespace osu.Game.Overlays.Settings.Sections
public class DebugSection : SettingsSection
{
public override string Header => "Debug";
public override IconUsage Icon => FontAwesome.Solid.Bug;
public override Drawable CreateIcon() => new SpriteIcon
{
RelativeSizeAxes = Axes.Both,
Icon = FontAwesome.Solid.Bug
};
public DebugSection()
{

View File

@ -13,7 +13,12 @@ namespace osu.Game.Overlays.Settings.Sections
public class GameplaySection : SettingsSection
{
public override string Header => "Gameplay";
public override IconUsage Icon => FontAwesome.Regular.Circle;
public override Drawable CreateIcon() => new SpriteIcon
{
RelativeSizeAxes = Axes.Both,
Icon = FontAwesome.Regular.Circle
};
public GameplaySection()
{

View File

@ -10,7 +10,12 @@ namespace osu.Game.Overlays.Settings.Sections
public class GeneralSection : SettingsSection
{
public override string Header => "General";
public override IconUsage Icon => FontAwesome.Solid.Cog;
public override Drawable CreateIcon() => new SpriteIcon
{
RelativeSizeAxes = Axes.Both,
Icon = FontAwesome.Solid.Cog
};
public GeneralSection()
{

View File

@ -10,7 +10,12 @@ namespace osu.Game.Overlays.Settings.Sections
public class GraphicsSection : SettingsSection
{
public override string Header => "Graphics";
public override IconUsage Icon => FontAwesome.Solid.Laptop;
public override Drawable CreateIcon() => new SpriteIcon
{
RelativeSizeAxes = Axes.Both,
Icon = FontAwesome.Solid.Laptop
};
public GraphicsSection()
{

View File

@ -10,7 +10,12 @@ namespace osu.Game.Overlays.Settings.Sections
public class InputSection : SettingsSection
{
public override string Header => "Input";
public override IconUsage Icon => FontAwesome.Regular.Keyboard;
public override Drawable CreateIcon() => new SpriteIcon
{
RelativeSizeAxes = Axes.Both,
Icon = FontAwesome.Solid.Keyboard
};
public InputSection(KeyBindingPanel keyConfig)
{

View File

@ -11,7 +11,12 @@ namespace osu.Game.Overlays.Settings.Sections
public class MaintenanceSection : SettingsSection
{
public override string Header => "Maintenance";
public override IconUsage Icon => FontAwesome.Solid.Wrench;
public override Drawable CreateIcon() => new SpriteIcon
{
RelativeSizeAxes = Axes.Both,
Icon = FontAwesome.Solid.Wrench
};
public MaintenanceSection()
{

View File

@ -10,7 +10,12 @@ namespace osu.Game.Overlays.Settings.Sections
public class OnlineSection : SettingsSection
{
public override string Header => "Online";
public override IconUsage Icon => FontAwesome.Solid.GlobeAsia;
public override Drawable CreateIcon() => new SpriteIcon
{
RelativeSizeAxes = Axes.Both,
Icon = FontAwesome.Solid.GlobeAsia
};
public OnlineSection()
{

View File

@ -19,7 +19,11 @@ namespace osu.Game.Overlays.Settings.Sections
public override string Header => "Skin";
public override IconUsage Icon => FontAwesome.Solid.PaintBrush;
public override Drawable CreateIcon() => new SpriteIcon
{
RelativeSizeAxes = Axes.Both,
Icon = FontAwesome.Solid.PaintBrush
};
private readonly Bindable<SkinInfo> dropdownBindable = new Bindable<SkinInfo> { Default = SkinInfo.Default };
private readonly Bindable<int> configBindable = new Bindable<int>();