1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 15:27:26 +08:00

Remove usages of the 'new' keyword.

This commit is contained in:
Huo Yaoyuan 2017-03-07 16:17:51 +08:00
parent b56d6c767b
commit 8979b28496
5 changed files with 20 additions and 20 deletions

View File

@ -16,7 +16,7 @@ namespace osu.Game.Overlays.Mods
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
Colour = colours.Blue;
BottonColour = colours.Blue;
SelectedColour = colours.BlueLight;
}

View File

@ -16,7 +16,7 @@ namespace osu.Game.Overlays.Mods
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
Colour = colours.Yellow;
BottonColour = colours.Yellow;
SelectedColour = colours.YellowLight;
}

View File

@ -16,7 +16,7 @@ namespace osu.Game.Overlays.Mods
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
Colour = colours.Green;
BottonColour = colours.Green;
SelectedColour = colours.GreenLight;
}

View File

@ -52,7 +52,7 @@ namespace osu.Game.Overlays.Mods
iconsContainer.RotateTo(Selected ? 5f : 0f, 300, EasingTypes.OutElastic);
iconsContainer.ScaleTo(Selected ? 1.1f : 1f, 300, EasingTypes.OutElastic);
foregroundIcon.Colour = Selected ? SelectedColour : Colour;
foregroundIcon.Colour = Selected ? SelectedColour : ButtonColour;
displaySelectedMod();
}
@ -60,17 +60,17 @@ namespace osu.Game.Overlays.Mods
public bool Selected => selectedIndex != -1;
private Color4 backgroundColour;
public new Color4 Colour
private Color4 buttonColour;
public Color4 ButtonColour
{
get
{
return backgroundColour;
return buttonColour;
}
set
{
if (value == backgroundColour) return;
backgroundColour = value;
if (value == buttonColour) return;
buttonColour = value;
foreach (ModIcon icon in iconsContainer.Children)
{
icon.Colour = value;
@ -180,7 +180,7 @@ namespace osu.Game.Overlays.Mods
Anchor = Anchor.Centre,
AutoSizeAxes = Axes.Both,
Position = new Vector2(1.5f),
Colour = this.Colour
Colour = this.ButtonColour
},
foregroundIcon = new ModIcon
{
@ -188,7 +188,7 @@ namespace osu.Game.Overlays.Mods
Anchor = Anchor.Centre,
AutoSizeAxes = Axes.Both,
Position = new Vector2(-1.5f),
Colour = this.Colour
Colour = this.ButtonColour
},
});
}
@ -199,7 +199,7 @@ namespace osu.Game.Overlays.Mods
Origin = Anchor.Centre,
Anchor = Anchor.Centre,
AutoSizeAxes = Axes.Both,
Colour = this.Colour
Colour = this.ButtonColour
});
}
}
@ -208,7 +208,7 @@ namespace osu.Game.Overlays.Mods
{
base.LoadComplete();
foreach (ModIcon icon in iconsContainer.Children)
icon.Colour = Colour;
icon.Colour = ButtonColour;
}
public ModButton(Mod m)

View File

@ -50,7 +50,7 @@ namespace osu.Game.Overlays.Mods
foreach (ModButton button in value)
{
button.Colour = Colour;
button.ButtonColour = BottonColour;
button.SelectedColour = selectedColour;
button.Action = this.Action;
}
@ -59,21 +59,21 @@ namespace osu.Game.Overlays.Mods
}
}
private Color4 colour = Color4.White;
public new Color4 Colour
private Color4 buttonsBolour = Color4.White;
public Color4 BottonColour
{
get
{
return colour;
return buttonsBolour;
}
set
{
if (value == colour) return;
colour = value;
if (value == buttonsBolour) return;
buttonsBolour = value;
foreach (ModButton button in buttons)
{
button.Colour = value;
button.ButtonColour = value;
}
}
}