mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 22:56:36 +09:00
Add Color4.Opacity and OsuColor.Gray
This commit is contained in:
@ -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
|
||||
{
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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,
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user