Merge branch 'master' into numpad-enter

This commit is contained in:
Dean Herbert
2017-06-16 15:32:52 +09:00
committed by GitHub
142 changed files with 1170 additions and 850 deletions

View File

@ -25,13 +25,13 @@ namespace osu.Game.Screens.Edit
protected override void OnEntering(Screen last)
{
base.OnEntering(last);
Background.Schedule(() => Background.FadeColour(Color4.DarkGray, 500));
Background.FadeColour(Color4.DarkGray, 500);
Beatmap?.Track?.Stop();
}
protected override bool OnExiting(Screen next)
{
Background.Schedule(() => Background.FadeColour(Color4.White, 500));
Background.FadeColour(Color4.White, 500);
Beatmap?.Track?.Start();
return base.OnExiting(next);
}

View File

@ -54,7 +54,7 @@ namespace osu.Game.Screens.Menu
{
Masking = true,
MaskingSmoothness = 2,
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Shadow,
Colour = Color4.Black.Opacity(0.2f),
@ -66,7 +66,7 @@ namespace osu.Game.Screens.Menu
Scale = new Vector2(0, 1),
Size = boxSize,
Shear = new Vector2(ButtonSystem.WEDGE_WIDTH / boxSize.Y, 0),
Children = new []
Children = new[]
{
new Box
{
@ -283,9 +283,9 @@ namespace osu.Game.Screens.Menu
public ButtonState State
{
get { return state; }
set
{
if (state == value)
return;

View File

@ -192,10 +192,8 @@ namespace osu.Game.Screens.Menu
public MenuState State
{
get
{
return state;
}
get { return state; }
set
{
if (state == value) return;

View File

@ -51,10 +51,7 @@ namespace osu.Game.Screens.Menu
public bool Triangles
{
set
{
colourAndTriangles.Alpha = value ? 1 : 0;
}
set { colourAndTriangles.Alpha = value ? 1 : 0; }
}
protected override bool InternalContains(Vector2 screenSpacePos) => logoContainer.Contains(screenSpacePos);
@ -62,10 +59,7 @@ namespace osu.Game.Screens.Menu
public bool Ripple
{
get { return rippleContainer.Alpha > 0; }
set
{
rippleContainer.Alpha = value ? 1 : 0;
}
set { rippleContainer.Alpha = value ? 1 : 0; }
}
public bool Interactive = true;

View File

@ -47,7 +47,7 @@ namespace osu.Game.Screens.Multiplayer
Height = height;
CornerRadius = 5;
Masking = true;
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Shadow,
Colour = Color4.Black.Opacity(40),
@ -68,7 +68,7 @@ namespace osu.Game.Screens.Multiplayer
},
avatar = new UpdateableAvatar
{
Size = new Vector2(Height - content_padding* 2),
Size = new Vector2(Height - content_padding * 2),
Masking = true,
CornerRadius = 5f,
Margin = new MarginPadding { Left = content_padding * 2, Top = content_padding },

View File

@ -24,12 +24,12 @@ namespace osu.Game.Screens.Multiplayer
{
base.OnEntering(last);
Background.Schedule(() => Background.FadeColour(Color4.DarkGray, 500));
Background.FadeColour(Color4.DarkGray, 500);
}
protected override bool OnExiting(Screen next)
{
Background.Schedule(() => Background.FadeColour(Color4.White, 500));
Background.FadeColour(Color4.White, 500);
return base.OnExiting(next);
}
}

View File

@ -54,7 +54,6 @@ namespace osu.Game.Screens.Play.HUD
{
AutoSizeAxes = Axes.Both,
Scale = new Vector2(0.6f),
});
}

View File

@ -57,7 +57,7 @@ namespace osu.Game.Screens.Play.HUD
return;
glowColour = value;
fill.EdgeEffect = new EdgeEffect
fill.EdgeEffect = new EdgeEffectParameters
{
Colour = glowColour.Opacity(base_glow_opacity),
Radius = 8,

View File

@ -164,7 +164,7 @@ namespace osu.Game.Screens.Play
AutoSizeAxes = Axes.Y,
Direction = FillDirection.Vertical,
Masking = true,
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Shadow,
Colour = Color4.Black.Opacity(0.6f),

View File

@ -278,7 +278,6 @@ namespace osu.Game.Screens.Play
{
if (!pauseContainer.IsPaused)
decoupledClock.Start();
});
pauseContainer.Alpha = 0;

View File

@ -79,7 +79,7 @@ namespace osu.Game.Screens.Play.ReplaySettings
{
Origin = Anchor.Centre,
Anchor = Anchor.CentreRight,
Position = new Vector2(-15,0),
Position = new Vector2(-15, 0),
Icon = FontAwesome.fa_bars,
Scale = new Vector2(0.75f),
Action = toggleContentVisibility,

View File

@ -232,7 +232,7 @@ namespace osu.Game.Screens.Play
AutoSizeAxes = Axes.Both,
Origin = Anchor.Centre,
Direction = FillDirection.Horizontal,
Children = new []
Children = new[]
{
new TextAwesome { Icon = FontAwesome.fa_chevron_right },
new TextAwesome { Icon = FontAwesome.fa_chevron_right },

View File

@ -146,7 +146,7 @@ namespace osu.Game.Screens.Play
double progress = ((audioClock?.CurrentTime ?? Time.Current) - firstHitTime) / (lastHitTime - firstHitTime);
if(progress < 1)
if (progress < 1)
{
bar.UpdatePosition((float)progress);
graph.Progress = (int)(graph.ColumnCount * progress);

View File

@ -34,7 +34,7 @@ namespace osu.Game.Screens.Play
{
IHasEndTime end = h as IHasEndTime;
int startRange = (int)((h.StartTime - firstHit)/ interval);
int startRange = (int)((h.StartTime - firstHit) / interval);
int endRange = (int)(((end?.EndTime > 0 ? end.EndTime : h.StartTime) - firstHit) / interval);
for (int i = startRange; i <= endRange; i++)
values[i]++;

View File

@ -69,7 +69,7 @@ namespace osu.Game.Screens.Play
public override bool Invalidate(Invalidation invalidation = Invalidation.All, Drawable source = null, bool shallPropagate = true)
{
if ((invalidation & Invalidation.SizeInParentSpace) > 0)
if ((invalidation & Invalidation.DrawSize) > 0)
layout.Invalidate();
return base.Invalidate(invalidation, source, shallPropagate);
}

View File

@ -36,19 +36,6 @@ namespace osu.Game.Screens.Ranking
}
}
public override bool Active
{
get
{
return base.Active;
}
set
{
base.Active = value;
colouredPart.FadeColour(Active ? activeColour : inactiveColour, 200, EasingTypes.OutQuint);
}
}
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
@ -60,7 +47,7 @@ namespace osu.Game.Screens.Ranking
activeColour = colours.PinkDarker;
inactiveColour = OsuColour.Gray(0.8f);
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Colour = Color4.Black.Opacity(0.4f),
Type = EdgeEffectType.Shadow,
@ -104,5 +91,9 @@ namespace osu.Game.Screens.Ranking
}
};
}
protected override void OnActivated() => colouredPart.FadeColour(activeColour, 200, EasingTypes.OutQuint);
protected override void OnDeactivated() => colouredPart.FadeColour(inactiveColour, 200, EasingTypes.OutQuint);
}
}

View File

@ -71,7 +71,6 @@ namespace osu.Game.Screens.Ranking
using (BeginDelayedSequence(transition_time * 0.25f, true))
{
circleOuter.ScaleTo(1, transition_time, EasingTypes.OutQuint);
circleOuter.FadeTo(1, transition_time, EasingTypes.OutQuint);
@ -135,7 +134,7 @@ namespace osu.Game.Screens.Ranking
circleOuter = new CircularContainer
{
Size = new Vector2(circle_outer_scale),
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Colour = Color4.Black.Opacity(0.4f),
Type = EdgeEffectType.Shadow,
@ -226,7 +225,7 @@ namespace osu.Game.Screens.Ranking
circleInner = new CircularContainer
{
Size = new Vector2(0.6f),
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Colour = Color4.Black.Opacity(0.4f),
Type = EdgeEffectType.Shadow,

View File

@ -50,7 +50,7 @@ namespace osu.Game.Screens.Ranking
},
new CircularContainer
{
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Colour = colours.GrayF.Opacity(0.8f),
Type = EdgeEffectType.Shadow,
@ -64,7 +64,8 @@ namespace osu.Game.Screens.Ranking
Origin = Anchor.Centre,
Children = new Drawable[]
{
new Box{
new Box
{
RelativeSizeAxes = Axes.Both,
Alpha = 0,
AlwaysPresent = true
@ -73,7 +74,7 @@ namespace osu.Game.Screens.Ranking
},
content = new CircularContainer
{
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Colour = Color4.Black.Opacity(0.2f),
Type = EdgeEffectType.Shadow,
@ -87,6 +88,5 @@ namespace osu.Game.Screens.Ranking
}
});
}
}
}

View File

@ -244,7 +244,7 @@ namespace osu.Game.Screens.Select
private BeatmapGroup createGroup(BeatmapSetInfo beatmapSet)
{
foreach(var b in beatmapSet.Beatmaps)
foreach (var b in beatmapSet.Beatmaps)
{
if (b.Metadata == null)
b.Metadata = beatmapSet.Metadata;

View File

@ -47,6 +47,7 @@ namespace osu.Game.Screens.Select
public BeatmapInfo Beatmap
{
get { return beatmap; }
set
{
if (beatmap == value) return;
@ -79,8 +80,8 @@ namespace osu.Game.Screens.Select
lookup.Success += res =>
{
if (beatmap != requestedBeatmap)
//the beatmap has been changed since we started the lookup.
return;
//the beatmap has been changed since we started the lookup.
return;
requestedBeatmap.Metrics = res;
Schedule(() => updateMetrics(res));
@ -88,6 +89,7 @@ namespace osu.Game.Screens.Select
lookup.Failure += e => updateMetrics(null);
api.Queue(lookup);
loading.Show();
}
updateMetrics(requestedBeatmap.Metrics, false);
@ -103,6 +105,9 @@ namespace osu.Game.Screens.Select
var hasRatings = metrics?.Ratings.Any() ?? false;
var hasRetriesFails = (metrics?.Retries.Any() ?? false) && metrics.Fails.Any();
if (failOnMissing)
loading.Hide();
if (hasRatings)
{
var ratings = metrics.Ratings.ToList();
@ -165,7 +170,7 @@ namespace osu.Game.Screens.Select
Direction = FillDirection.Vertical,
LayoutDuration = 200,
LayoutEasing = EasingTypes.OutQuint,
Children = new []
Children = new[]
{
description = new MetadataSegment("Description"),
source = new MetadataSegment("Source"),
@ -199,9 +204,9 @@ namespace osu.Game.Screens.Select
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Direction = FillDirection.Vertical,
Spacing = new Vector2(0,5),
Spacing = new Vector2(0, 5),
Padding = new MarginPadding(10),
Children = new []
Children = new[]
{
circleSize = new DifficultyRow("Circle Size", 7),
drainRate = new DifficultyRow("HP Drain"),
@ -319,11 +324,13 @@ namespace osu.Game.Screens.Select
}
},
},
}
},
loading = new LoadingAnimation()
};
}
private APIAccess api;
private readonly LoadingAnimation loading;
[BackgroundDependencyLoader]
private void load(OsuColour colour, APIAccess api)
@ -479,7 +486,7 @@ namespace osu.Game.Screens.Select
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Direction = FillDirection.Full,
Spacing = new Vector2(5,0),
Spacing = new Vector2(5, 0),
Margin = new MarginPadding { Top = header.TextSize }
}
};

View File

@ -36,7 +36,7 @@ namespace osu.Game.Screens.Select
Masking = true;
BorderColour = new Color4(221, 255, 255, 255);
BorderThickness = 2.5f;
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Glow,
Colour = new Color4(130, 204, 255, 150),

View File

@ -12,6 +12,7 @@ using System;
using osu.Framework.Allocation;
using osu.Framework.Threading;
using osu.Game.Database;
using osu.Game.Graphics.UserInterface;
using osu.Game.Rulesets.Scoring;
using osu.Game.Online.API;
using osu.Game.Online.API.Requests;
@ -25,6 +26,8 @@ namespace osu.Game.Screens.Select.Leaderboards
public Action<Score> ScoreSelected;
private readonly LoadingAnimation loading;
private IEnumerable<Score> scores;
public IEnumerable<Score> Scores
{
@ -86,6 +89,7 @@ namespace osu.Game.Screens.Select.Leaderboards
},
},
},
loading = new LoadingAnimation()
};
}
@ -117,6 +121,7 @@ namespace osu.Game.Screens.Select.Leaderboards
}
private GetScoresRequest getScoresRequest;
private void updateScores()
{
if (!IsLoaded) return;
@ -126,8 +131,14 @@ namespace osu.Game.Screens.Select.Leaderboards
if (api == null || Beatmap == null) return;
loading.Show();
getScoresRequest = new GetScoresRequest(Beatmap);
getScoresRequest.Success += r => Scores = r.Scores;
getScoresRequest.Success += r =>
{
Scores = r.Scores;
loading.Hide();
};
api.Queue(getScoresRequest);
}

View File

@ -147,7 +147,7 @@ namespace osu.Game.Screens.Select.Leaderboards
CornerRadius = corner_radius,
Masking = true,
OnLoadComplete = d => d.FadeInFromZero(200),
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Shadow,
Radius = 1,

View File

@ -99,7 +99,7 @@ namespace osu.Game.Screens.Select.Options
RelativeSizeAxes = Axes.Both,
Shear = new Vector2(0.2f, 0f),
Masking = true,
EdgeEffect = new EdgeEffect
EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Shadow,
Colour = Color4.Black.Opacity(0.2f),

View File

@ -335,7 +335,6 @@ namespace osu.Game.Screens.Tournament
{
Logger.Error(ex, "Failed to read last drawings results.");
}
}
else
{

View File

@ -83,6 +83,7 @@ namespace osu.Game.Screens.Tournament
private ScrollState scrollState
{
get { return _scrollState; }
set
{
if (_scrollState == value)
@ -329,6 +330,7 @@ namespace osu.Game.Screens.Tournament
public bool Selected
{
get { return selected; }
set
{
selected = value;