Add Color4.Opacity and OsuColor.Gray

This commit is contained in:
Drew DeVault
2017-01-10 13:44:40 -05:00
parent 70ecf48ca7
commit c222be05c0
13 changed files with 27 additions and 19 deletions

View File

@ -66,7 +66,7 @@ namespace osu.Game.Overlays.Toolbar
solidBackground = new Box
{
RelativeSizeAxes = Axes.Both,
Colour = new Color4(0.1f, 0.1f, 0.1f, 1),
Colour = OsuColor.Gray(0.1f),
Alpha = alpha_normal,
},
gradientBackground = new Box
@ -75,7 +75,8 @@ namespace osu.Game.Overlays.Toolbar
Anchor = Anchor.BottomLeft,
Alpha = 0,
Height = 90,
ColourInfo = ColourInfo.GradientVertical(new Color4(0.1f, 0.1f, 0.1f, 0.5f), new Color4(0.1f, 0.1f, 0.1f, 0f)),
ColourInfo = ColourInfo.GradientVertical(
OsuColor.Gray(0.1f).Opacity(0.5f), OsuColor.Gray(0.1f).Opacity(0)),
},
new FlowContainer
{

View File

@ -70,7 +70,7 @@ namespace osu.Game.Overlays.Toolbar
HoverBackground = new Box
{
RelativeSizeAxes = Axes.Both,
Colour = new Color4(80, 80, 80, 180),
Colour = OsuColor.Gray(80).Opacity(180),
BlendingMode = BlendingMode.Additive,
Alpha = 0,
},
@ -144,7 +144,7 @@ namespace osu.Game.Overlays.Toolbar
{
Action?.Invoke();
sampleClick.Play();
HoverBackground.FlashColour(new Color4(255, 255, 255, 100), 500, EasingTypes.OutQuint);
HoverBackground.FlashColour(Color4.White.Opacity(100), 500, EasingTypes.OutQuint);
return true;
}
@ -174,7 +174,7 @@ namespace osu.Game.Overlays.Toolbar
new Box
{
RelativeSizeAxes = Axes.Both,
Colour = new Color4(30, 30, 30, 255)
Colour = OsuColor.Gray(30)
},
new Triangles
{

View File

@ -17,6 +17,7 @@ using osu.Game.Configuration;
using osu.Game.Online.API;
using OpenTK;
using OpenTK.Graphics;
using osu.Game.Graphics;
namespace osu.Game.Overlays.Toolbar
{
@ -41,7 +42,7 @@ namespace osu.Game.Overlays.Toolbar
Add(StateBackground = new Box
{
RelativeSizeAxes = Axes.Both,
Colour = new Color4(150, 150, 150, 180),
Colour = OsuColor.Gray(150).Opacity(180),
BlendingMode = BlendingMode.Additive,
Depth = 2,
Alpha = 0,

View File

@ -16,6 +16,7 @@ using osu.Game.Configuration;
using osu.Game.Online.API;
using OpenTK;
using OpenTK.Graphics;
using osu.Game.Graphics;
namespace osu.Game.Overlays.Toolbar
{
@ -73,7 +74,7 @@ namespace osu.Game.Overlays.Toolbar
{
Type = EdgeEffectType.Shadow,
Radius = 4,
Colour = new Color4(0, 0, 0, 0.1f),
Colour = Color4.Black.Opacity(0.1f),
};
Masking = true;