Hook up icons better.

This commit is contained in:
Dean Herbert
2017-01-30 13:35:40 +09:00
parent 0c2152f3d0
commit 2ed5cf7c91
10 changed files with 32 additions and 26 deletions

View File

@ -3,7 +3,6 @@
using osu.Framework.Extensions;
using osu.Framework.Graphics.Containers;
using osu.Game.Graphics;
using osu.Game.Modes;
using OpenTK.Graphics;
@ -20,7 +19,7 @@ namespace osu.Game.Overlays.Toolbar
mode = value;
TooltipMain = mode.GetDescription();
TooltipSub = $"Play some {mode.GetDescription()}";
Icon = getModeIcon(mode);
Icon = Ruleset.GetRuleset(mode).Icon;
}
}
@ -48,17 +47,6 @@ namespace osu.Game.Overlays.Toolbar
}
}
private FontAwesome getModeIcon(PlayMode mode)
{
switch (mode)
{
default: return FontAwesome.fa_osu_osu_o;
case PlayMode.Taiko: return FontAwesome.fa_osu_taiko_o;
case PlayMode.Catch: return FontAwesome.fa_osu_fruits_o;
case PlayMode.Mania: return FontAwesome.fa_osu_mania_o;
}
}
protected override void LoadComplete()
{
base.LoadComplete();