mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Simplify OverlayRulesetTabItem.AccentColour
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Rulesets;
|
||||
@ -28,6 +27,16 @@ namespace osu.Game.Overlays.Profile.Header.Components
|
||||
}
|
||||
}
|
||||
|
||||
protected override Color4 AccentColour
|
||||
{
|
||||
get => base.AccentColour;
|
||||
set
|
||||
{
|
||||
base.AccentColour = value;
|
||||
icon.FadeColour(value, 120, Easing.OutQuint);
|
||||
}
|
||||
}
|
||||
|
||||
private readonly SpriteIcon icon;
|
||||
|
||||
public ProfileRulesetTabItem(RulesetInfo value)
|
||||
@ -43,11 +52,5 @@ namespace osu.Game.Overlays.Profile.Header.Components
|
||||
Size = new Vector2(12),
|
||||
});
|
||||
}
|
||||
|
||||
protected override void OnCurrentColourChanged(ValueChangedEvent<Color4> colour)
|
||||
{
|
||||
base.OnCurrentColourChanged(colour);
|
||||
icon.FadeColour(colour.NewValue, 120, Easing.OutQuint);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user