Merge pull request #1053 from Tom94/no-more-colourinfo

Use Colour instead of ColourInfo
This commit is contained in:
Dean Herbert
2017-07-25 10:21:26 +09:00
committed by GitHub
20 changed files with 26 additions and 26 deletions

View File

@ -17,7 +17,7 @@ namespace osu.Desktop.VisualTests.Tests
{ {
Add(new Box Add(new Box
{ {
ColourInfo = ColourInfo.GradientVertical(Color4.Gray, Color4.WhiteSmoke), Colour = ColourInfo.GradientVertical(Color4.Gray, Color4.WhiteSmoke),
RelativeSizeAxes = Framework.Graphics.Axes.Both, RelativeSizeAxes = Framework.Graphics.Axes.Both,
}); });
Add(new ButtonSystem()); Add(new ButtonSystem());

View File

@ -207,7 +207,7 @@ namespace osu.Desktop.Overlays
new Box new Box
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
ColourInfo = ColourInfo.GradientVertical(colours.YellowDark, colours.Yellow) Colour = ColourInfo.GradientVertical(colours.YellowDark, colours.Yellow)
}, },
new TextAwesome new TextAwesome
{ {

View File

@ -122,7 +122,7 @@ namespace osu.Game.Rulesets.Mania.UI
{ {
Name = "Key gradient", Name = "Key gradient",
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
ColourInfo = ColourInfo.GradientVertical(Color4.Black, Color4.Black.Opacity(0)), Colour = ColourInfo.GradientVertical(Color4.Black, Color4.Black.Opacity(0)),
Alpha = 0.5f Alpha = 0.5f
}, },
keyIcon = new Container keyIcon = new Container

View File

@ -158,7 +158,7 @@ namespace osu.Game.Rulesets.Taiko.UI
Anchor = Anchor.TopRight, Anchor = Anchor.TopRight,
RelativeSizeAxes = Axes.Y, RelativeSizeAxes = Axes.Y,
Width = 10, Width = 10,
ColourInfo = Framework.Graphics.Colour.ColourInfo.GradientHorizontal(Color4.Black.Opacity(0.6f), Color4.Black.Opacity(0)), Colour = Framework.Graphics.Colour.ColourInfo.GradientHorizontal(Color4.Black.Opacity(0.6f), Color4.Black.Opacity(0)),
}, },
} }
}, },

View File

@ -34,7 +34,7 @@ namespace osu.Game.Beatmaps.Drawables
GainedSelection?.Invoke(this); GainedSelection?.Invoke(this);
background.ColourInfo = ColourInfo.GradientVertical( background.Colour = ColourInfo.GradientVertical(
new Color4(20, 43, 51, 255), new Color4(20, 43, 51, 255),
new Color4(40, 86, 102, 255)); new Color4(40, 86, 102, 255));

View File

@ -119,21 +119,21 @@ namespace osu.Game.Beatmaps.Drawables
new Box new Box
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
ColourInfo = ColourInfo.GradientHorizontal( Colour = ColourInfo.GradientHorizontal(
Color4.Black, new Color4(0f, 0f, 0f, 0.9f)), Color4.Black, new Color4(0f, 0f, 0f, 0.9f)),
Width = 0.05f, Width = 0.05f,
}, },
new Box new Box
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
ColourInfo = ColourInfo.GradientHorizontal( Colour = ColourInfo.GradientHorizontal(
new Color4(0f, 0f, 0f, 0.9f), new Color4(0f, 0f, 0f, 0.1f)), new Color4(0f, 0f, 0f, 0.9f), new Color4(0f, 0f, 0f, 0.1f)),
Width = 0.2f, Width = 0.2f,
}, },
new Box new Box
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
ColourInfo = ColourInfo.GradientHorizontal( Colour = ColourInfo.GradientHorizontal(
new Color4(0f, 0f, 0f, 0.1f), new Color4(0, 0, 0, 0)), new Color4(0f, 0f, 0f, 0.1f), new Color4(0, 0, 0, 0)),
Width = 0.05f, Width = 0.05f,
}, },

View File

@ -148,9 +148,9 @@ namespace osu.Game.Graphics.UserInterface
private void updateGlow() private void updateGlow()
{ {
leftGlow.ColourInfo = ColourInfo.GradientHorizontal(new Color4(ButtonColour.R, ButtonColour.G, ButtonColour.B, 0f), ButtonColour); leftGlow.Colour = ColourInfo.GradientHorizontal(new Color4(ButtonColour.R, ButtonColour.G, ButtonColour.B, 0f), ButtonColour);
centerGlow.Colour = ButtonColour; centerGlow.Colour = ButtonColour;
rightGlow.ColourInfo = ColourInfo.GradientHorizontal(ButtonColour, new Color4(ButtonColour.R, ButtonColour.G, ButtonColour.B, 0f)); rightGlow.Colour = ColourInfo.GradientHorizontal(ButtonColour, new Color4(ButtonColour.R, ButtonColour.G, ButtonColour.B, 0f));
} }
public DialogButton() public DialogButton()

View File

@ -60,7 +60,7 @@ namespace osu.Game.Overlays.Direct
new Box new Box
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
ColourInfo = ColourInfo.GradientHorizontal(Color4.Black.Opacity(0.25f), Color4.Black.Opacity(0.75f)), Colour = ColourInfo.GradientHorizontal(Color4.Black.Opacity(0.25f), Color4.Black.Opacity(0.75f)),
}, },
new Container new Container
{ {

View File

@ -261,7 +261,7 @@ namespace osu.Game.Overlays
{ {
RelativeSizeAxes = Axes.Both; RelativeSizeAxes = Axes.Both;
Width = 0f; Width = 0f;
ColourInfo = ColourInfo.GradientHorizontal(Color4.White.Opacity(start), Color4.White.Opacity(end)); Colour = ColourInfo.GradientHorizontal(Color4.White.Opacity(start), Color4.White.Opacity(end));
Masking = true; Masking = true;
Children = new[] Children = new[]

View File

@ -18,7 +18,7 @@ namespace osu.Game.Overlays.Notifications
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(OsuColour colours) private void load(OsuColour colours)
{ {
IconBackgound.ColourInfo = ColourInfo.GradientVertical(colours.GreenDark, colours.GreenLight); IconBackgound.Colour = ColourInfo.GradientVertical(colours.GreenDark, colours.GreenLight);
} }
} }
} }

View File

@ -47,7 +47,7 @@ namespace osu.Game.Overlays.Notifications
IconBackgound = new Box IconBackgound = new Box
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
ColourInfo = ColourInfo.GradientVertical(OsuColour.Gray(0.2f), OsuColour.Gray(0.6f)) Colour = ColourInfo.GradientVertical(OsuColour.Gray(0.2f), OsuColour.Gray(0.6f))
}, },
iconDrawable = new TextAwesome iconDrawable = new TextAwesome
{ {

View File

@ -58,7 +58,7 @@ namespace osu.Game.Overlays.Profile
new Box new Box
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
ColourInfo = ColourInfo.GradientVertical(Color4.Black.Opacity(0.1f), Color4.Black.Opacity(0.75f)) Colour = ColourInfo.GradientVertical(Color4.Black.Opacity(0.1f), Color4.Black.Opacity(0.75f))
}, },
new Container new Container
{ {

View File

@ -99,7 +99,7 @@ namespace osu.Game.Overlays.Toolbar
Anchor = Anchor.BottomLeft, Anchor = Anchor.BottomLeft,
Alpha = 0, Alpha = 0,
Height = 90, Height = 90,
ColourInfo = ColourInfo.GradientVertical( Colour = ColourInfo.GradientVertical(
OsuColour.Gray(0.1f).Opacity(0.5f), OsuColour.Gray(0.1f).Opacity(0)), OsuColour.Gray(0.1f).Opacity(0.5f), OsuColour.Gray(0.1f).Opacity(0)),
}, },
}; };

View File

@ -73,8 +73,8 @@ namespace osu.Game.Screens.Menu
Color4 gradientDark = colours.Blue.Opacity(0).ToLinear(); Color4 gradientDark = colours.Blue.Opacity(0).ToLinear();
Color4 gradientLight = colours.Blue.Opacity(0.3f).ToLinear(); Color4 gradientLight = colours.Blue.Opacity(0.3f).ToLinear();
leftBox.ColourInfo = ColourInfo.GradientHorizontal(gradientLight, gradientDark); leftBox.Colour = ColourInfo.GradientHorizontal(gradientLight, gradientDark);
rightBox.ColourInfo = ColourInfo.GradientHorizontal(gradientDark, gradientLight); rightBox.Colour = ColourInfo.GradientHorizontal(gradientDark, gradientLight);
} }
protected override void OnNewBeat(int beatIndex, TimingControlPoint timingPoint, EffectControlPoint effectPoint, TrackAmplitudes amplitudes) protected override void OnNewBeat(int beatIndex, TimingControlPoint timingPoint, EffectControlPoint effectPoint, TrackAmplitudes amplitudes)

View File

@ -112,7 +112,7 @@ namespace osu.Game.Screens.Multiplayer
new Box new Box
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
ColourInfo = ColourInfo.GradientVertical(Color4.Black.Opacity(0.5f), Color4.Black.Opacity(0)), Colour = ColourInfo.GradientVertical(Color4.Black.Opacity(0.5f), Color4.Black.Opacity(0)),
}, },
new Container new Container
{ {

View File

@ -133,7 +133,7 @@ namespace osu.Game.Screens.Ranking
{ {
new Box new Box
{ {
ColourInfo = ColourInfo.GradientHorizontal( Colour = ColourInfo.GradientHorizontal(
colours.GrayC.Opacity(0), colours.GrayC.Opacity(0),
colours.GrayC.Opacity(0.9f)), colours.GrayC.Opacity(0.9f)),
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
@ -143,7 +143,7 @@ namespace osu.Game.Screens.Ranking
{ {
Anchor = Anchor.TopRight, Anchor = Anchor.TopRight,
Origin = Anchor.TopRight, Origin = Anchor.TopRight,
ColourInfo = ColourInfo.GradientHorizontal( Colour = ColourInfo.GradientHorizontal(
colours.GrayC.Opacity(0.9f), colours.GrayC.Opacity(0.9f),
colours.GrayC.Opacity(0)), colours.GrayC.Opacity(0)),
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,

View File

@ -140,7 +140,7 @@ namespace osu.Game.Screens.Select
new Container new Container
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
ColourInfo = ColourInfo.GradientVertical(Color4.White, Color4.White.Opacity(0.3f)), Colour = ColourInfo.GradientVertical(Color4.White, Color4.White.Opacity(0.3f)),
Children = new[] Children = new[]
{ {
// Zoomed-in and cropped beatmap background // Zoomed-in and cropped beatmap background

View File

@ -163,7 +163,7 @@ namespace osu.Game.Screens.Select.Leaderboards
c.Colour = Color4.Transparent; c.Colour = Color4.Transparent;
else else
{ {
c.ColourInfo = ColourInfo.GradientVertical( c.Colour = ColourInfo.GradientVertical(
Color4.White.Opacity(Math.Min(1 - (topY - fadeStart) / LeaderboardScore.HEIGHT, 1)), Color4.White.Opacity(Math.Min(1 - (topY - fadeStart) / LeaderboardScore.HEIGHT, 1)),
Color4.White.Opacity(Math.Min(1 - (bottomY - fadeStart) / LeaderboardScore.HEIGHT, 1))); Color4.White.Opacity(Math.Min(1 - (bottomY - fadeStart) / LeaderboardScore.HEIGHT, 1)));
} }

View File

@ -68,7 +68,7 @@ namespace osu.Game.Screens.Tournament
Origin = Anchor.BottomCentre, Origin = Anchor.BottomCentre,
Size = new Vector2(2, 55), Size = new Vector2(2, 55),
ColourInfo = ColourInfo.GradientVertical(Color4.Transparent, Color4.White) Colour = ColourInfo.GradientVertical(Color4.Transparent, Color4.White)
}, },
new Box new Box
{ {
@ -76,7 +76,7 @@ namespace osu.Game.Screens.Tournament
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
Size = new Vector2(2, 55), Size = new Vector2(2, 55),
ColourInfo = ColourInfo.GradientVertical(Color4.White, Color4.Transparent) Colour = ColourInfo.GradientVertical(Color4.White, Color4.Transparent)
} }
} }
} }