mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Simplify colour setting for additional elements in OverlayRulesetTabItem
This commit is contained in:
@ -5,7 +5,6 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Rulesets;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Overlays.Profile.Header.Components
|
||||
{
|
||||
@ -13,12 +12,6 @@ namespace osu.Game.Overlays.Profile.Header.Components
|
||||
{
|
||||
private readonly SpriteIcon icon;
|
||||
|
||||
public new Color4 AccentColour
|
||||
{
|
||||
get => base.AccentColour;
|
||||
set => base.AccentColour = icon.Colour = value;
|
||||
}
|
||||
|
||||
private bool isDefault;
|
||||
|
||||
public bool IsDefault
|
||||
@ -47,12 +40,8 @@ namespace osu.Game.Overlays.Profile.Header.Components
|
||||
Icon = FontAwesome.Solid.Star,
|
||||
Size = new Vector2(12),
|
||||
});
|
||||
}
|
||||
|
||||
protected override void UpdateState()
|
||||
{
|
||||
base.UpdateState();
|
||||
icon.FadeColour(GetColour(), 120, Easing.OutQuint);
|
||||
OnStateUpdated += colour => icon.FadeColour(colour, 120, Easing.OutQuint);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user