Remove unnecessary null check and tweak transform a bit.

This commit is contained in:
Unknown
2017-11-26 11:19:42 +05:30
parent ae9ce2f122
commit f4f732ca43
2 changed files with 18 additions and 21 deletions

View File

@ -232,6 +232,8 @@ namespace osu.Game.Screens.Select.Leaderboards
if (api == null || Beatmap?.OnlineBeatmapID == null) return;
loading.Show();
if (Scope == LeaderboardScope.Local)
{
// TODO: get local scores from wherever here.
@ -239,8 +241,6 @@ namespace osu.Game.Screens.Select.Leaderboards
return;
}
loading.Show();
getScoresRequest = new GetScoresRequest(Beatmap, osuGame?.Ruleset.Value, Scope);
getScoresRequest.Success += r =>
{
@ -323,13 +323,13 @@ namespace osu.Game.Screens.Select.Leaderboards
protected override bool OnMouseDown(Framework.Input.InputState state, Framework.Input.MouseDownEventArgs args)
{
icon.ScaleTo(0.8f, 200, Easing.InElastic);
icon.ScaleTo(0.8f, 800, Easing.InElastic);
return base.OnMouseDown(state, args);
}
protected override bool OnMouseUp(Framework.Input.InputState state, Framework.Input.MouseUpEventArgs args)
{
icon.ScaleTo(1.2f, 400, Easing.OutElastic).Then().ScaleTo(1f, 400, Easing.OutElastic);
icon.ScaleTo(1.2f, 800, Easing.OutElastic).Then().ScaleTo(1f, 800, Easing.OutElastic);
return base.OnMouseUp(state, args);
}
}