mirror of
https://github.com/ppy/osu.git
synced 2025-01-19 12:22:57 +08:00
Fix colours.
This commit is contained in:
parent
b629766892
commit
caf3ec1400
@ -1,16 +1,13 @@
|
|||||||
using OpenTK;
|
using OpenTK;
|
||||||
using OpenTK.Graphics;
|
using OpenTK.Graphics;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Extensions.Color4Extensions;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Framework.Screens.Testing;
|
using osu.Framework.Screens.Testing;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Backgrounds;
|
using osu.Game.Graphics.Backgrounds;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace osu.Desktop.VisualTests.Tests
|
namespace osu.Desktop.VisualTests.Tests
|
||||||
{
|
{
|
||||||
@ -25,26 +22,26 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
Add(new CentreHitCirclePiece
|
Add(new CentreHitCirclePiece
|
||||||
{
|
{
|
||||||
Position = new Vector2(100, 100),
|
Position = new Vector2(100, 100),
|
||||||
AccentColour = Color4.Red
|
KiaiMode = true
|
||||||
});
|
});
|
||||||
|
|
||||||
Add(new RimHitCirclePiece
|
Add(new RimHitCirclePiece
|
||||||
{
|
{
|
||||||
Position = new Vector2(100, 250),
|
Position = new Vector2(100, 250),
|
||||||
AccentColour = Color4.Blue
|
KiaiMode = true
|
||||||
});
|
});
|
||||||
|
|
||||||
Add(new BashCirclePiece
|
Add(new BashCirclePiece
|
||||||
{
|
{
|
||||||
Position = new Vector2(100, 400),
|
Position = new Vector2(100, 400),
|
||||||
AccentColour = Color4.Orange
|
KiaiMode = true
|
||||||
});
|
});
|
||||||
|
|
||||||
Add(new DrumRollCirclePiece
|
Add(new DrumRollCirclePiece
|
||||||
{
|
{
|
||||||
Width = 256,
|
Width = 256,
|
||||||
Position = new Vector2(100, 550),
|
Position = new Vector2(100, 550),
|
||||||
AccentColour = Color4.Yellow
|
KiaiMode = true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -68,6 +65,12 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
Height = 128;
|
Height = 128;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(OsuColour colours)
|
||||||
|
{
|
||||||
|
AccentColour = colours.BlueDarker;
|
||||||
|
}
|
||||||
|
|
||||||
protected override Drawable CreateIcon()
|
protected override Drawable CreateIcon()
|
||||||
{
|
{
|
||||||
return new CircularContainer
|
return new CircularContainer
|
||||||
@ -104,6 +107,12 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
Height = 128;
|
Height = 128;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(OsuColour colours)
|
||||||
|
{
|
||||||
|
AccentColour = colours.PinkDarker;
|
||||||
|
}
|
||||||
|
|
||||||
protected override Drawable CreateIcon()
|
protected override Drawable CreateIcon()
|
||||||
{
|
{
|
||||||
return new CircularContainer
|
return new CircularContainer
|
||||||
@ -136,6 +145,12 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
Height = 128;
|
Height = 128;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(OsuColour colours)
|
||||||
|
{
|
||||||
|
AccentColour = colours.YellowDark;
|
||||||
|
}
|
||||||
|
|
||||||
protected override Drawable CreateIcon()
|
protected override Drawable CreateIcon()
|
||||||
{
|
{
|
||||||
return new TextAwesome
|
return new TextAwesome
|
||||||
@ -158,6 +173,12 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
{
|
{
|
||||||
Height = 128;
|
Height = 128;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(OsuColour colours)
|
||||||
|
{
|
||||||
|
AccentColour = colours.YellowDark;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -189,11 +210,13 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The colour of the inner circle and outer glows.
|
/// The colour of the inner circle and outer glows.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Color4 AccentColour;
|
public Color4 AccentColour { get; protected set; }
|
||||||
|
|
||||||
private Container innerLayer;
|
private Container innerLayer;
|
||||||
private Container backingGlowContainer;
|
private Container backingGlowContainer;
|
||||||
private Container innerCircleContainer;
|
private Container innerCircleContainer;
|
||||||
|
private Box innerBackground;
|
||||||
|
private Triangles triangles;
|
||||||
|
|
||||||
public CirclePiece()
|
public CirclePiece()
|
||||||
{
|
{
|
||||||
@ -246,21 +269,19 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new Box
|
innerBackground = new Box
|
||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
},
|
},
|
||||||
new Triangles
|
triangles = new Triangles
|
||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
|
||||||
Alpha = 0.75f
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -321,7 +342,10 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
if (KiaiMode)
|
if (KiaiMode)
|
||||||
innerCircleContainer.EdgeEffect = createKiaiEdgeEffect();
|
innerCircleContainer.EdgeEffect = createKiaiEdgeEffect();
|
||||||
|
|
||||||
innerCircleContainer.Colour = AccentColour;
|
innerBackground.Colour = AccentColour;
|
||||||
|
|
||||||
|
triangles.ColourLight = AccentColour;
|
||||||
|
triangles.ColourDark = AccentColour.Darken(0.1f);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Update()
|
protected override void Update()
|
||||||
|
Loading…
Reference in New Issue
Block a user