mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 21:47:25 +08:00
Remove usages of the 'new' keyword.
This commit is contained in:
parent
b56d6c767b
commit
8979b28496
@ -16,7 +16,7 @@ namespace osu.Game.Overlays.Mods
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
Colour = colours.Blue;
|
||||
BottonColour = colours.Blue;
|
||||
SelectedColour = colours.BlueLight;
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,7 @@ namespace osu.Game.Overlays.Mods
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
Colour = colours.Yellow;
|
||||
BottonColour = colours.Yellow;
|
||||
SelectedColour = colours.YellowLight;
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,7 @@ namespace osu.Game.Overlays.Mods
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
Colour = colours.Green;
|
||||
BottonColour = colours.Green;
|
||||
SelectedColour = colours.GreenLight;
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user