1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 12:17:26 +08:00

Remove new override in DialogButton

This commit is contained in:
DrabWeb 2017-02-27 21:38:25 -04:00
parent 164f205ee5
commit e8cae3b45e
6 changed files with 14 additions and 14 deletions

View File

@ -22,16 +22,16 @@ namespace osu.Game.Graphics.UserInterface
private const float glow_fade_duration = 250;
private const float click_duration = 200;
private Color4 colour;
public new Color4 Colour
private Color4 buttonColour;
public Color4 ButtonColour
{
get
{
return colour;
return buttonColour;
}
set
{
colour = value;
buttonColour = value;
updateGlow();
colourContainer.Colour = value;
}
@ -139,7 +139,7 @@ namespace osu.Game.Graphics.UserInterface
colourContainer.Add(flash);
flash.Colour = Colour;
flash.Colour = ButtonColour;
flash.BlendingMode = BlendingMode.Additive;
flash.Alpha = 0.3f;
flash.FadeOutFromOne(click_duration);
@ -148,9 +148,9 @@ namespace osu.Game.Graphics.UserInterface
private void updateGlow()
{
leftGlow.ColourInfo = ColourInfo.GradientHorizontal(new Color4(Colour.R, Colour.G, Colour.B, 0f), Colour);
centerGlow.Colour = Colour;
rightGlow.ColourInfo = ColourInfo.GradientHorizontal(Colour, new Color4(Colour.R, Colour.G, Colour.B, 0f));
leftGlow.ColourInfo = ColourInfo.GradientHorizontal(new Color4(ButtonColour.R, ButtonColour.G, ButtonColour.B, 0f), ButtonColour);
centerGlow.Colour = ButtonColour;
rightGlow.ColourInfo = ColourInfo.GradientHorizontal(ButtonColour, new Color4(ButtonColour.R, ButtonColour.G, ButtonColour.B, 0f));
}
public DialogButton()
@ -224,7 +224,7 @@ namespace osu.Game.Graphics.UserInterface
Colour = Color4.Black.Opacity(0.2f),
Radius = 5,
},
Colour = Colour,
Colour = ButtonColour,
Shear = new Vector2(0.2f, 0),
Children = new Drawable[]
{

View File

@ -12,7 +12,7 @@ namespace osu.Game.Overlays.Dialog
[BackgroundDependencyLoader]
private void load(OsuColour colours, AudioManager audio)
{
Colour = colours.Blue;
ButtonColour = colours.Blue;
SampleHover = audio.Sample.Get(@"Menu/menuclick");
SampleClick = audio.Sample.Get(@"Menu/menuback");
}

View File

@ -12,7 +12,7 @@ namespace osu.Game.Overlays.Dialog
[BackgroundDependencyLoader]
private void load(OsuColour colours, AudioManager audio)
{
Colour = colours.Pink;
ButtonColour = colours.Pink;
SampleHover = audio.Sample.Get(@"Menu/menuclick");
SampleClick = audio.Sample.Get(@"Menu/menu-play-click");
}

View File

@ -14,7 +14,7 @@ namespace osu.Game.Overlays.Pause
[BackgroundDependencyLoader]
private void load(AudioManager audio, OsuColour colours)
{
Colour = new Color4(170, 27, 39, 255); // The red from the design isn't in the palette so it's used directly
ButtonColour = new Color4(170, 27, 39, 255); // The red from the design isn't in the palette so it's used directly
SampleHover = audio.Sample.Get(@"Menu/menuclick");
SampleClick = audio.Sample.Get(@"Menu/menuback");
}

View File

@ -13,7 +13,7 @@ namespace osu.Game.Overlays.Pause
[BackgroundDependencyLoader]
private void load(AudioManager audio, OsuColour colours)
{
Colour = colours.Green;
ButtonColour = colours.Green;
SampleHover = audio.Sample.Get(@"Menu/menuclick");
SampleClick = audio.Sample.Get(@"Menu/menuback");
}

View File

@ -13,7 +13,7 @@ namespace osu.Game.Overlays.Pause
[BackgroundDependencyLoader]
private void load(AudioManager audio, OsuColour colours)
{
Colour = colours.YellowDark;
ButtonColour = colours.YellowDark;
SampleHover = audio.Sample.Get(@"Menu/menuclick");
SampleClick = audio.Sample.Get(@"Menu/menu-play-click");
}