1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-20 05:03:20 +08:00

Make note accent colour work again.

This commit is contained in:
smoogipooo 2017-05-04 15:36:37 +09:00
parent 956a7288fb
commit f945c636c2
3 changed files with 14 additions and 4 deletions

View File

@ -11,6 +11,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using OpenTK.Graphics;
namespace osu.Desktop.VisualTests.Tests
{
@ -31,7 +32,8 @@ namespace osu.Desktop.VisualTests.Tests
new DrawableNote(new Note())
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre
Origin = Anchor.Centre,
AccentColour = Color4.Red
}
}
});

View File

@ -2,6 +2,7 @@
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using OpenTK.Graphics;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
@ -17,7 +18,13 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
public DrawableNote(Note hitObject)
: base(hitObject)
{
Add(new NotePiece());
Add(headPiece = new NotePiece());
}
[BackgroundDependencyLoader]
private void load()
{
headPiece.AccentColour = AccentColour;
}
protected override void UpdateState(ArmedState state)

View File

@ -2,6 +2,7 @@
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using OpenTK.Graphics;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
@ -35,7 +36,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables.Pieces
Origin = Anchor.TopCentre,
RelativeSizeAxes = Axes.X,
Height = head_colour_height,
Alpha = 0.5f
Alpha = 0.2f
}
};
}
@ -50,7 +51,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables.Pieces
return;
accentColour = value;
colouredBox.Colour = AccentColour;
colouredBox.Colour = AccentColour.Lighten(0.9f);
EdgeEffect = new EdgeEffect
{