mirror of
https://github.com/ppy/osu.git
synced 2025-01-06 09:03:01 +08:00
Improve colours and hit metrics on key area
This commit is contained in:
parent
a543222a2b
commit
59bbbf1c08
@ -21,6 +21,9 @@ namespace osu.Game.Rulesets.Mania.Skinning.Argon
|
|||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
Height = ArgonNotePiece.NOTE_HEIGHT;
|
Height = ArgonNotePiece.NOTE_HEIGHT;
|
||||||
|
|
||||||
|
Masking = true;
|
||||||
|
CornerRadius = ArgonNotePiece.CORNER_RADIUS;
|
||||||
|
|
||||||
InternalChildren = new[]
|
InternalChildren = new[]
|
||||||
{
|
{
|
||||||
new Box
|
new Box
|
||||||
|
@ -12,6 +12,7 @@ using osu.Framework.Input.Bindings;
|
|||||||
using osu.Framework.Input.Events;
|
using osu.Framework.Input.Events;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Rulesets.Mania.UI;
|
using osu.Game.Rulesets.Mania.UI;
|
||||||
|
using osu.Game.Rulesets.Mania.UI.Components;
|
||||||
using osu.Game.Rulesets.UI.Scrolling;
|
using osu.Game.Rulesets.UI.Scrolling;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
@ -53,18 +54,24 @@ namespace osu.Game.Rulesets.Mania.Skinning.Argon
|
|||||||
Height = Stage.HIT_TARGET_POSITION,
|
Height = Stage.HIT_TARGET_POSITION,
|
||||||
Children = new[]
|
Children = new[]
|
||||||
{
|
{
|
||||||
background = new Box
|
new Container
|
||||||
{
|
{
|
||||||
Name = "Key gradient",
|
Masking = true,
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
CornerRadius = ArgonNotePiece.CORNER_RADIUS,
|
||||||
|
Child = background = new Box
|
||||||
|
{
|
||||||
|
Name = "Key gradient",
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
hitTargetLine = new Circle
|
hitTargetLine = new Circle
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Anchor = Anchor.TopCentre,
|
Anchor = Anchor.TopCentre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.BottomCentre,
|
||||||
Colour = OsuColour.Gray(196 / 255f),
|
Colour = OsuColour.Gray(196 / 255f),
|
||||||
Height = 4,
|
Height = ArgonNotePiece.CORNER_RADIUS * 2,
|
||||||
Masking = true,
|
Masking = true,
|
||||||
},
|
},
|
||||||
new Container
|
new Container
|
||||||
@ -137,10 +144,11 @@ namespace osu.Game.Rulesets.Mania.Skinning.Argon
|
|||||||
|
|
||||||
accentColour = column.AccentColour.GetBoundCopy();
|
accentColour = column.AccentColour.GetBoundCopy();
|
||||||
accentColour.BindValueChanged(colour =>
|
accentColour.BindValueChanged(colour =>
|
||||||
{
|
{
|
||||||
background.Colour = colour.NewValue.Darken(0.6f);
|
background.Colour = colour.NewValue.Darken(1f);
|
||||||
bottomIcon.Colour = colour.NewValue;
|
bottomIcon.Colour = colour.NewValue;
|
||||||
}, true);
|
},
|
||||||
|
true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onDirectionChanged(ValueChangedEvent<ScrollingDirection> direction)
|
private void onDirectionChanged(ValueChangedEvent<ScrollingDirection> direction)
|
||||||
@ -169,8 +177,8 @@ namespace osu.Game.Rulesets.Mania.Skinning.Argon
|
|||||||
Color4 lightingColour = accentColour.Value.Lighten(0.9f);
|
Color4 lightingColour = accentColour.Value.Lighten(0.9f);
|
||||||
|
|
||||||
background
|
background
|
||||||
.FadeColour(accentColour.Value.Lighten(0.4f), 40).Then()
|
.FadeColour(accentColour.Value, 40).Then()
|
||||||
.FadeColour(accentColour.Value, 150, Easing.OutQuint);
|
.FadeColour(accentColour.Value.Darken(0.4f), 150, Easing.OutQuint);
|
||||||
|
|
||||||
hitTargetLine.FadeColour(Color4.White, lighting_fade_in_duration, Easing.OutQuint);
|
hitTargetLine.FadeColour(Color4.White, lighting_fade_in_duration, Easing.OutQuint);
|
||||||
hitTargetLine.TransformTo(nameof(EdgeEffect), new EdgeEffectParameters
|
hitTargetLine.TransformTo(nameof(EdgeEffect), new EdgeEffectParameters
|
||||||
@ -225,7 +233,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.Argon
|
|||||||
{
|
{
|
||||||
Type = EdgeEffectType.Glow,
|
Type = EdgeEffectType.Glow,
|
||||||
Colour = lightingColour,
|
Colour = lightingColour,
|
||||||
Radius = 30,
|
Radius = 25,
|
||||||
}, lighting_fade_out_duration, Easing.OutQuint);
|
}, lighting_fade_out_duration, Easing.OutQuint);
|
||||||
|
|
||||||
bottomIcon.FadeColour(accentColour.Value, lighting_fade_out_duration, Easing.OutQuint);
|
bottomIcon.FadeColour(accentColour.Value, lighting_fade_out_duration, Easing.OutQuint);
|
||||||
|
Loading…
Reference in New Issue
Block a user