Merge branch 'master' into chat-line-word-wrap

This commit is contained in:
Dan Balasescu 2017-07-27 16:54:15 +09:30 committed by GitHub
commit d375459fa9
26 changed files with 41 additions and 34 deletions

@ -1 +1 @@
Subproject commit b2d10ab19b74ecd38911f8bdf278b42379da0530
Subproject commit 05a8b2637623bd8ac6c1619b728ea9b4cca35b8a

View File

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

View File

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

View File

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

View File

@ -158,7 +158,7 @@ namespace osu.Game.Rulesets.Taiko.UI
Anchor = Anchor.TopRight,
RelativeSizeAxes = Axes.Y,
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);
background.ColourInfo = ColourInfo.GradientVertical(
background.Colour = ColourInfo.GradientVertical(
new Color4(20, 43, 51, 255),
new Color4(40, 86, 102, 255));

View File

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

View File

@ -148,9 +148,9 @@ namespace osu.Game.Graphics.UserInterface
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;
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()

View File

@ -60,7 +60,7 @@ namespace osu.Game.Overlays.Direct
new Box
{
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
{

View File

@ -261,7 +261,7 @@ namespace osu.Game.Overlays
{
RelativeSizeAxes = Axes.Both;
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;
Children = new[]

View File

@ -18,7 +18,7 @@ namespace osu.Game.Overlays.Notifications
[BackgroundDependencyLoader]
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
{
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
{

View File

@ -58,7 +58,7 @@ namespace osu.Game.Overlays.Profile
new Box
{
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
{
@ -129,7 +129,7 @@ namespace osu.Game.Overlays.Profile
Origin = Anchor.BottomLeft,
Y = -48
},
countryFlag = new DrawableFlag(user.Country?.FlagName ?? "__")
countryFlag = new DrawableFlag(user.Country?.FlagName)
{
Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft,

View File

@ -99,7 +99,7 @@ namespace osu.Game.Overlays.Toolbar
Anchor = Anchor.BottomLeft,
Alpha = 0,
Height = 90,
ColourInfo = ColourInfo.GradientVertical(
Colour = ColourInfo.GradientVertical(
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 gradientLight = colours.Blue.Opacity(0.3f).ToLinear();
leftBox.ColourInfo = ColourInfo.GradientHorizontal(gradientLight, gradientDark);
rightBox.ColourInfo = ColourInfo.GradientHorizontal(gradientDark, gradientLight);
leftBox.Colour = ColourInfo.GradientHorizontal(gradientLight, gradientDark);
rightBox.Colour = ColourInfo.GradientHorizontal(gradientDark, gradientLight);
}
protected override void OnNewBeat(int beatIndex, TimingControlPoint timingPoint, EffectControlPoint effectPoint, TrackAmplitudes amplitudes)

View File

@ -27,7 +27,7 @@ namespace osu.Game.Screens.Multiplayer
set
{
host.Text = value.Username;
flagContainer.Children = new[] { new DrawableFlag(value.Country?.FlagName ?? @"__") { RelativeSizeAxes = Axes.Both } };
flagContainer.Children = new[] { new DrawableFlag(value.Country?.FlagName) { RelativeSizeAxes = Axes.Both } };
}
}

View File

@ -112,7 +112,7 @@ namespace osu.Game.Screens.Multiplayer
new Box
{
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
{

View File

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

View File

@ -18,10 +18,11 @@ using System.Threading.Tasks;
using osu.Framework.Allocation;
using osu.Framework.Threading;
using osu.Framework.Configuration;
using osu.Game.Graphics.Containers;
namespace osu.Game.Screens.Select
{
internal class BeatmapCarousel : ScrollContainer
internal class BeatmapCarousel : OsuScrollContainer
{
public BeatmapInfo SelectedBeatmap => selectedPanel?.Beatmap;
@ -177,6 +178,9 @@ namespace osu.Game.Screens.Select
public void SelectNextRandom()
{
if (groups.Count == 0)
return;
randomSelectedBeatmaps.Push(new KeyValuePair<BeatmapGroup, BeatmapPanel>(selectedGroup, selectedGroup.SelectedPanel));
var visibleGroups = getVisibleGroups();
@ -310,6 +314,9 @@ namespace osu.Game.Screens.Select
private void removeGroup(BeatmapGroup group)
{
if (group == null)
return;
groups.Remove(group);
panels.Remove(group.Header);
foreach (var p in group.BeatmapPanels)

View File

@ -140,7 +140,7 @@ namespace osu.Game.Screens.Select
new Container
{
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[]
{
// Zoomed-in and cropped beatmap background

View File

@ -163,7 +163,7 @@ namespace osu.Game.Screens.Select.Leaderboards
c.Colour = Color4.Transparent;
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 - (bottomY - fadeStart) / LeaderboardScore.HEIGHT, 1)));
}

View File

@ -191,7 +191,7 @@ namespace osu.Game.Screens.Select.Leaderboards
Masking = true,
Children = new Drawable[]
{
new DrawableFlag(Score.User?.Country?.FlagName ?? "__")
new DrawableFlag(Score.User?.Country?.FlagName)
{
Width = 30,
RelativeSizeAxes = Axes.Y,

View File

@ -384,7 +384,7 @@ namespace osu.Game.Screens.Select
private void promptDelete()
{
if (Beatmap != null)
if (Beatmap != null && !Beatmap.IsDefault)
dialogOverlay?.Push(new BeatmapDeleteDialog(Beatmap));
}

View File

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

View File

@ -49,9 +49,9 @@ namespace osu.Game.Users
sprite.Texture = textures.Get($@"Flags/{flagName}");
}
public DrawableFlag(string name = @"__")
public DrawableFlag(string name = null)
{
flagName = name;
flagName = name ?? @"__";
Children = new Drawable[]
{

View File

@ -102,7 +102,7 @@ namespace osu.Game.Users
Spacing = new Vector2(5f, 0f),
Children = new Drawable[]
{
new DrawableFlag(user.Country?.FlagName ?? @"__")
new DrawableFlag(user.Country?.FlagName)
{
Width = 30f,
RelativeSizeAxes = Axes.Y,