1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 12:17:26 +08:00

Add shading to mod pills

This commit is contained in:
mk56-spn 2023-01-16 19:16:35 +01:00
parent 83b10d61f4
commit 6c30ba25bc
2 changed files with 12 additions and 1 deletions

View File

@ -29,7 +29,7 @@ namespace osu.Game.Tests.Visual.SongSelect
Accuracy = 1,
MaxCombo = 244,
TotalScore = 1707827,
Mods = new Mod[] { new OsuModHidden(), new OsuModHardRock(), },
Mods = new Mod[] { new OsuModHidden(), new OsuModHardRock(), new OsuModAlternate(), new OsuModFlashlight(), new OsuModFreezeFrame() },
Ruleset = new OsuRuleset().RulesetInfo,
User = new APIUser
{
@ -44,6 +44,7 @@ namespace osu.Game.Tests.Visual.SongSelect
Rank = ScoreRank.S,
Accuracy = 0.1f,
MaxCombo = 2404,
Mods = new Mod[] { new OsuModHidden(), new OsuModHardRock(), new OsuModAlternate(), new OsuModFlashlight(), new OsuModFreezeFrame(), new OsuModClassic() },
TotalScore = 1707827,
Ruleset = new OsuRuleset().RulesetInfo,
User = new APIUser

View File

@ -9,6 +9,7 @@ using osu.Framework.Extensions.LocalisationExtensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.UserInterface;
using osu.Framework.Input.Events;
@ -451,6 +452,15 @@ namespace osu.Game.Online.Leaderboards
public ColouredModSwitchTiny(IMod mod)
: base(mod)
{
Masking = true;
EdgeEffect = new EdgeEffectParameters
{
Roundness = 15,
Type = EdgeEffectType.Shadow,
Colour = Colour4.Black.Opacity(0.15f),
Radius = 3,
Offset = new Vector2(-2, 0)
};
}
protected override void UpdateState()