mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Remove usages of the 'new' keyword.
This commit is contained in:
@ -16,7 +16,7 @@ namespace osu.Game.Overlays.Mods
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours)
|
||||||
{
|
{
|
||||||
Colour = colours.Blue;
|
BottonColour = colours.Blue;
|
||||||
SelectedColour = colours.BlueLight;
|
SelectedColour = colours.BlueLight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ namespace osu.Game.Overlays.Mods
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours)
|
||||||
{
|
{
|
||||||
Colour = colours.Yellow;
|
BottonColour = colours.Yellow;
|
||||||
SelectedColour = colours.YellowLight;
|
SelectedColour = colours.YellowLight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ namespace osu.Game.Overlays.Mods
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours)
|
||||||
{
|
{
|
||||||
Colour = colours.Green;
|
BottonColour = colours.Green;
|
||||||
SelectedColour = colours.GreenLight;
|
SelectedColour = colours.GreenLight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ namespace osu.Game.Overlays.Mods
|
|||||||
|
|
||||||
iconsContainer.RotateTo(Selected ? 5f : 0f, 300, EasingTypes.OutElastic);
|
iconsContainer.RotateTo(Selected ? 5f : 0f, 300, EasingTypes.OutElastic);
|
||||||
iconsContainer.ScaleTo(Selected ? 1.1f : 1f, 300, EasingTypes.OutElastic);
|
iconsContainer.ScaleTo(Selected ? 1.1f : 1f, 300, EasingTypes.OutElastic);
|
||||||
foregroundIcon.Colour = Selected ? SelectedColour : Colour;
|
foregroundIcon.Colour = Selected ? SelectedColour : ButtonColour;
|
||||||
|
|
||||||
displaySelectedMod();
|
displaySelectedMod();
|
||||||
}
|
}
|
||||||
@ -60,17 +60,17 @@ namespace osu.Game.Overlays.Mods
|
|||||||
|
|
||||||
public bool Selected => selectedIndex != -1;
|
public bool Selected => selectedIndex != -1;
|
||||||
|
|
||||||
private Color4 backgroundColour;
|
private Color4 buttonColour;
|
||||||
public new Color4 Colour
|
public Color4 ButtonColour
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return backgroundColour;
|
return buttonColour;
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (value == backgroundColour) return;
|
if (value == buttonColour) return;
|
||||||
backgroundColour = value;
|
buttonColour = value;
|
||||||
foreach (ModIcon icon in iconsContainer.Children)
|
foreach (ModIcon icon in iconsContainer.Children)
|
||||||
{
|
{
|
||||||
icon.Colour = value;
|
icon.Colour = value;
|
||||||
@ -180,7 +180,7 @@ namespace osu.Game.Overlays.Mods
|
|||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
AutoSizeAxes = Axes.Both,
|
AutoSizeAxes = Axes.Both,
|
||||||
Position = new Vector2(1.5f),
|
Position = new Vector2(1.5f),
|
||||||
Colour = this.Colour
|
Colour = this.ButtonColour
|
||||||
},
|
},
|
||||||
foregroundIcon = new ModIcon
|
foregroundIcon = new ModIcon
|
||||||
{
|
{
|
||||||
@ -188,7 +188,7 @@ namespace osu.Game.Overlays.Mods
|
|||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
AutoSizeAxes = Axes.Both,
|
AutoSizeAxes = Axes.Both,
|
||||||
Position = new Vector2(-1.5f),
|
Position = new Vector2(-1.5f),
|
||||||
Colour = this.Colour
|
Colour = this.ButtonColour
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -199,7 +199,7 @@ namespace osu.Game.Overlays.Mods
|
|||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
AutoSizeAxes = Axes.Both,
|
AutoSizeAxes = Axes.Both,
|
||||||
Colour = this.Colour
|
Colour = this.ButtonColour
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -208,7 +208,7 @@ namespace osu.Game.Overlays.Mods
|
|||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
foreach (ModIcon icon in iconsContainer.Children)
|
foreach (ModIcon icon in iconsContainer.Children)
|
||||||
icon.Colour = Colour;
|
icon.Colour = ButtonColour;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ModButton(Mod m)
|
public ModButton(Mod m)
|
||||||
|
@ -50,7 +50,7 @@ namespace osu.Game.Overlays.Mods
|
|||||||
|
|
||||||
foreach (ModButton button in value)
|
foreach (ModButton button in value)
|
||||||
{
|
{
|
||||||
button.Colour = Colour;
|
button.ButtonColour = BottonColour;
|
||||||
button.SelectedColour = selectedColour;
|
button.SelectedColour = selectedColour;
|
||||||
button.Action = this.Action;
|
button.Action = this.Action;
|
||||||
}
|
}
|
||||||
@ -59,21 +59,21 @@ namespace osu.Game.Overlays.Mods
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private Color4 colour = Color4.White;
|
private Color4 buttonsBolour = Color4.White;
|
||||||
public new Color4 Colour
|
public Color4 BottonColour
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return colour;
|
return buttonsBolour;
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (value == colour) return;
|
if (value == buttonsBolour) return;
|
||||||
colour = value;
|
buttonsBolour = value;
|
||||||
|
|
||||||
foreach (ModButton button in buttons)
|
foreach (ModButton button in buttons)
|
||||||
{
|
{
|
||||||
button.Colour = value;
|
button.ButtonColour = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user