mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 15:12:57 +08:00
Merge branch 'master' into info-wedge-design-update
This commit is contained in:
commit
91b264da1a
16
.vscode/tasks.json
vendored
16
.vscode/tasks.json
vendored
@ -10,10 +10,16 @@
|
|||||||
"showOutput": "silent",
|
"showOutput": "silent",
|
||||||
"command": "msbuild",
|
"command": "msbuild",
|
||||||
"args": [
|
"args": [
|
||||||
// Ask msbuild to generate full paths for file names.
|
|
||||||
"/property:GenerateFullPaths=true",
|
"/property:GenerateFullPaths=true",
|
||||||
"/property:DebugType=portable"
|
"/property:DebugType=portable"
|
||||||
],
|
],
|
||||||
|
"windows": {
|
||||||
|
"args": [
|
||||||
|
"/property:GenerateFullPaths=true",
|
||||||
|
"/property:DebugType=portable",
|
||||||
|
"/m" //parallel compiling support. doesn't work well with mono atm
|
||||||
|
]
|
||||||
|
},
|
||||||
// Use the standard MS compiler pattern to detect errors, warnings and infos
|
// Use the standard MS compiler pattern to detect errors, warnings and infos
|
||||||
"problemMatcher": "$msCompile",
|
"problemMatcher": "$msCompile",
|
||||||
"isBuildCommand": true
|
"isBuildCommand": true
|
||||||
@ -29,6 +35,14 @@
|
|||||||
"/property:DebugType=portable",
|
"/property:DebugType=portable",
|
||||||
"/target:Clean,Build"
|
"/target:Clean,Build"
|
||||||
],
|
],
|
||||||
|
"windows": {
|
||||||
|
"args": [
|
||||||
|
"/property:GenerateFullPaths=true",
|
||||||
|
"/property:DebugType=portable",
|
||||||
|
"/target:Clean,Build",
|
||||||
|
"/m" //parallel compiling support. doesn't work well with mono atm
|
||||||
|
]
|
||||||
|
},
|
||||||
// Use the standard MS compiler pattern to detect errors, warnings and infos
|
// Use the standard MS compiler pattern to detect errors, warnings and infos
|
||||||
"problemMatcher": "$msCompile",
|
"problemMatcher": "$msCompile",
|
||||||
"isBuildCommand": true
|
"isBuildCommand": true
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using osu.Framework.Configuration;
|
using osu.Framework.Configuration;
|
||||||
using osu.Framework.Platform;
|
using osu.Framework.Platform;
|
||||||
|
using osu.Game.Screens.Select;
|
||||||
|
|
||||||
namespace osu.Game.Configuration
|
namespace osu.Game.Configuration
|
||||||
{
|
{
|
||||||
@ -34,6 +35,8 @@ namespace osu.Game.Configuration
|
|||||||
|
|
||||||
Set(OsuConfig.MenuParallax, true);
|
Set(OsuConfig.MenuParallax, true);
|
||||||
|
|
||||||
|
Set(OsuConfig.BeatmapDetailTab, BeatmapDetailTab.Details);
|
||||||
|
|
||||||
Set(OsuConfig.ShowInterface, true);
|
Set(OsuConfig.ShowInterface, true);
|
||||||
Set(OsuConfig.KeyOverlay, false);
|
Set(OsuConfig.KeyOverlay, false);
|
||||||
//todo: implement all settings below this line (remove the Disabled set when doing so).
|
//todo: implement all settings below this line (remove the Disabled set when doing so).
|
||||||
@ -316,6 +319,7 @@ namespace osu.Game.Configuration
|
|||||||
MenuMusic,
|
MenuMusic,
|
||||||
MenuVoice,
|
MenuVoice,
|
||||||
MenuParallax,
|
MenuParallax,
|
||||||
|
BeatmapDetailTab,
|
||||||
RawInput,
|
RawInput,
|
||||||
AbsoluteToOsuWindow,
|
AbsoluteToOsuWindow,
|
||||||
ConfineMouse,
|
ConfineMouse,
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace osu.Game.Database
|
namespace osu.Game.Database
|
||||||
{
|
{
|
||||||
@ -18,11 +19,13 @@ namespace osu.Game.Database
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Points of failure on a relative time scale (usually 0..100).
|
/// Points of failure on a relative time scale (usually 0..100).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[JsonProperty(@"fail")]
|
||||||
public IEnumerable<int> Fails { get; set; }
|
public IEnumerable<int> Fails { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Points of retry on a relative time scale (usually 0..100).
|
/// Points of retry on a relative time scale (usually 0..100).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[JsonProperty(@"exit")]
|
||||||
public IEnumerable<int> Retries { get; set; }
|
public IEnumerable<int> Retries { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
46
osu.Game/Online/API/Requests/GetBeatmapDetailsRequest.cs
Normal file
46
osu.Game/Online/API/Requests/GetBeatmapDetailsRequest.cs
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using osu.Game.Database;
|
||||||
|
|
||||||
|
namespace osu.Game.Online.API.Requests
|
||||||
|
{
|
||||||
|
public class GetBeatmapDetailsRequest : APIRequest<GetBeatmapDeatilsResponse>
|
||||||
|
{
|
||||||
|
private readonly BeatmapInfo beatmap;
|
||||||
|
|
||||||
|
private string lookupString => beatmap.OnlineBeatmapID > 0 ? beatmap.OnlineBeatmapID.ToString() : $@"lookup?checksum={beatmap.Hash}&filename={beatmap.Path}";
|
||||||
|
|
||||||
|
public GetBeatmapDetailsRequest(BeatmapInfo beatmap)
|
||||||
|
{
|
||||||
|
this.beatmap = beatmap;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override string Target => $@"beatmaps/{lookupString}";
|
||||||
|
}
|
||||||
|
|
||||||
|
public class GetBeatmapDeatilsResponse : BeatmapMetrics
|
||||||
|
{
|
||||||
|
//the online API returns some metrics as a nested object.
|
||||||
|
[JsonProperty(@"failtimes")]
|
||||||
|
private BeatmapMetrics failTimes
|
||||||
|
{
|
||||||
|
set
|
||||||
|
{
|
||||||
|
Fails = value.Fails;
|
||||||
|
Retries = value.Retries;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//and other metrics in the beatmap set.
|
||||||
|
[JsonProperty(@"beatmapset")]
|
||||||
|
private BeatmapMetrics beatmapSet
|
||||||
|
{
|
||||||
|
set
|
||||||
|
{
|
||||||
|
Ratings = value.Ratings;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -294,7 +294,7 @@ namespace osu.Game.Overlays
|
|||||||
trackManager.SetExclusive(current.Track);
|
trackManager.SetExclusive(current.Track);
|
||||||
current.Track.Start();
|
current.Track.Start();
|
||||||
beatmapSource.Value = current;
|
beatmapSource.Value = current;
|
||||||
}).ContinueWith(task => Schedule(() => task.ThrowIfFaulted()), TaskContinuationOptions.OnlyOnFaulted);
|
}).ContinueWith(task => Schedule(task.ThrowIfFaulted), TaskContinuationOptions.OnlyOnFaulted);
|
||||||
updateDisplay(current, isNext ? TransformDirection.Next : TransformDirection.Prev);
|
updateDisplay(current, isNext ? TransformDirection.Next : TransformDirection.Prev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,8 +38,6 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
protected override void Update()
|
protected override void Update()
|
||||||
{
|
{
|
||||||
base.Update();
|
|
||||||
|
|
||||||
if (parentClock == null) return;
|
if (parentClock == null) return;
|
||||||
|
|
||||||
clock.Rate = parentClock.Rate;
|
clock.Rate = parentClock.Rate;
|
||||||
|
@ -28,7 +28,7 @@ namespace osu.Game.Screens.Select
|
|||||||
{
|
{
|
||||||
beatmap = value;
|
beatmap = value;
|
||||||
Leaderboard.Beatmap = beatmap?.BeatmapInfo;
|
Leaderboard.Beatmap = beatmap?.BeatmapInfo;
|
||||||
Details.Beatmap = beatmap?.Beatmap.BeatmapInfo;
|
Details.Beatmap = beatmap?.BeatmapInfo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -66,14 +66,14 @@ namespace osu.Game.Screens.Select
|
|||||||
{
|
{
|
||||||
Details = new BeatmapDetails
|
Details = new BeatmapDetails
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.X,
|
||||||
Padding = new MarginPadding(5),
|
Masking = true,
|
||||||
|
Height = 352,
|
||||||
Alpha = 0,
|
Alpha = 0,
|
||||||
},
|
},
|
||||||
Leaderboard = new Leaderboard
|
Leaderboard = new Leaderboard
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -4,10 +4,12 @@
|
|||||||
using System;
|
using System;
|
||||||
using OpenTK.Graphics;
|
using OpenTK.Graphics;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Configuration;
|
||||||
using osu.Framework.Extensions.Color4Extensions;
|
using osu.Framework.Extensions.Color4Extensions;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
|
||||||
@ -21,15 +23,22 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
public Action<BeatmapDetailTab, bool> OnFilter; //passed the selected tab and if mods is checked
|
public Action<BeatmapDetailTab, bool> OnFilter; //passed the selected tab and if mods is checked
|
||||||
|
|
||||||
|
private Bindable<BeatmapDetailTab> selectedTab;
|
||||||
|
|
||||||
private void invokeOnFilter()
|
private void invokeOnFilter()
|
||||||
{
|
{
|
||||||
OnFilter?.Invoke(tabs.Current, modsCheckbox.Current);
|
OnFilter?.Invoke(tabs.Current, modsCheckbox.Current);
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colour)
|
private void load(OsuColour colour, OsuConfigManager config)
|
||||||
{
|
{
|
||||||
modsCheckbox.AccentColour = tabs.AccentColour = colour.YellowLight;
|
modsCheckbox.AccentColour = tabs.AccentColour = colour.YellowLight;
|
||||||
|
|
||||||
|
selectedTab = config.GetBindable<BeatmapDetailTab>(OsuConfig.BeatmapDetailTab);
|
||||||
|
|
||||||
|
tabs.Current.BindTo(selectedTab);
|
||||||
|
tabs.Current.TriggerChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
public BeatmapDetailAreaTabControl()
|
public BeatmapDetailAreaTabControl()
|
||||||
@ -62,8 +71,6 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
tabs.Current.ValueChanged += item => invokeOnFilter();
|
tabs.Current.ValueChanged += item => invokeOnFilter();
|
||||||
modsCheckbox.Current.ValueChanged += item => invokeOnFilter();
|
modsCheckbox.Current.ValueChanged += item => invokeOnFilter();
|
||||||
|
|
||||||
tabs.Current.Value = BeatmapDetailTab.Global;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,6 +14,9 @@ using osu.Game.Graphics.Sprites;
|
|||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using osu.Game.Online.API;
|
||||||
|
using osu.Game.Online.API.Requests;
|
||||||
|
using osu.Framework.Threading;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Select
|
namespace osu.Game.Screens.Select
|
||||||
{
|
{
|
||||||
@ -39,60 +42,108 @@ namespace osu.Game.Screens.Select
|
|||||||
private readonly BarGraph retryGraph;
|
private readonly BarGraph retryGraph;
|
||||||
private readonly BarGraph failGraph;
|
private readonly BarGraph failGraph;
|
||||||
|
|
||||||
|
private ScheduledDelegate pendingBeatmapSwitch;
|
||||||
private BeatmapInfo beatmap;
|
private BeatmapInfo beatmap;
|
||||||
|
|
||||||
public BeatmapInfo Beatmap
|
public BeatmapInfo Beatmap
|
||||||
{
|
{
|
||||||
get
|
get { return beatmap; }
|
||||||
{
|
|
||||||
return beatmap;
|
|
||||||
}
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
beatmap = value;
|
beatmap = value;
|
||||||
if (beatmap == null) return;
|
|
||||||
|
|
||||||
description.Text = beatmap.Version;
|
pendingBeatmapSwitch?.Cancel();
|
||||||
source.Text = beatmap.Metadata.Source;
|
pendingBeatmapSwitch = Schedule(updateStats);
|
||||||
tags.Text = beatmap.Metadata.Tags;
|
|
||||||
|
|
||||||
circleSize.Value = beatmap.Difficulty.CircleSize;
|
|
||||||
drainRate.Value = beatmap.Difficulty.DrainRate;
|
|
||||||
overallDifficulty.Value = beatmap.Difficulty.OverallDifficulty;
|
|
||||||
approachRate.Value = beatmap.Difficulty.ApproachRate;
|
|
||||||
stars.Value = (float)beatmap.StarDifficulty;
|
|
||||||
|
|
||||||
if (beatmap.Metrics?.Ratings.Any() ?? false)
|
|
||||||
{
|
|
||||||
var ratings = beatmap.Metrics.Ratings.ToList();
|
|
||||||
ratingsContainer.Show();
|
|
||||||
|
|
||||||
negativeRatings.Text = ratings.GetRange(0, ratings.Count / 2).Sum().ToString();
|
|
||||||
positiveRatings.Text = ratings.GetRange(ratings.Count / 2, ratings.Count / 2).Sum().ToString();
|
|
||||||
ratingsBar.Length = (float)ratings.GetRange(0, ratings.Count / 2).Sum() / ratings.Sum();
|
|
||||||
|
|
||||||
ratingsGraph.Values = ratings.Select(rating => (float)rating);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
ratingsContainer.Hide();
|
|
||||||
|
|
||||||
if ((beatmap.Metrics?.Retries.Any() ?? false) && beatmap.Metrics.Fails.Any())
|
|
||||||
{
|
|
||||||
var retries = beatmap.Metrics.Retries;
|
|
||||||
var fails = beatmap.Metrics.Fails;
|
|
||||||
retryFailContainer.Show();
|
|
||||||
|
|
||||||
float maxValue = fails.Zip(retries, (fail, retry) => fail + retry).Max();
|
|
||||||
failGraph.MaxValue = maxValue;
|
|
||||||
retryGraph.MaxValue = maxValue;
|
|
||||||
|
|
||||||
failGraph.Values = fails.Select(fail => (float)fail);
|
|
||||||
retryGraph.Values = retries.Zip(fails, (retry, fail) => retry + MathHelper.Clamp(fail, 0, maxValue));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
retryFailContainer.Hide();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void updateStats()
|
||||||
|
{
|
||||||
|
if (beatmap == null) return;
|
||||||
|
|
||||||
|
description.Text = beatmap.Version;
|
||||||
|
source.Text = beatmap.Metadata.Source;
|
||||||
|
tags.Text = beatmap.Metadata.Tags;
|
||||||
|
|
||||||
|
circleSize.Value = beatmap.Difficulty.CircleSize;
|
||||||
|
drainRate.Value = beatmap.Difficulty.DrainRate;
|
||||||
|
overallDifficulty.Value = beatmap.Difficulty.OverallDifficulty;
|
||||||
|
approachRate.Value = beatmap.Difficulty.ApproachRate;
|
||||||
|
stars.Value = (float)beatmap.StarDifficulty;
|
||||||
|
|
||||||
|
var requestedBeatmap = beatmap;
|
||||||
|
if (requestedBeatmap.Metrics == null)
|
||||||
|
{
|
||||||
|
var lookup = new GetBeatmapDetailsRequest(requestedBeatmap);
|
||||||
|
lookup.Success += res =>
|
||||||
|
{
|
||||||
|
if (beatmap != requestedBeatmap)
|
||||||
|
//the beatmap has been changed since we started the lookup.
|
||||||
|
return;
|
||||||
|
|
||||||
|
requestedBeatmap.Metrics = res;
|
||||||
|
Schedule(() => updateMetrics(res));
|
||||||
|
};
|
||||||
|
lookup.Failure += e => updateMetrics(null);
|
||||||
|
|
||||||
|
api.Queue(lookup);
|
||||||
|
}
|
||||||
|
|
||||||
|
updateMetrics(requestedBeatmap.Metrics, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Update displayed metrics.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="metrics">New metrics to overwrite the existing display. Can be null.</param>
|
||||||
|
/// <param name="failOnMissing">Whether to hide the display on null or empty metrics. If false, we will dim as if waiting for further updates.</param>
|
||||||
|
private void updateMetrics(BeatmapMetrics metrics, bool failOnMissing = true)
|
||||||
|
{
|
||||||
|
var hasRatings = metrics?.Ratings.Any() ?? false;
|
||||||
|
var hasRetriesFails = (metrics?.Retries.Any() ?? false) && metrics.Fails.Any();
|
||||||
|
|
||||||
|
if (hasRatings)
|
||||||
|
{
|
||||||
|
var ratings = metrics.Ratings.ToList();
|
||||||
|
ratingsContainer.Show();
|
||||||
|
|
||||||
|
negativeRatings.Text = ratings.GetRange(0, ratings.Count / 2).Sum().ToString();
|
||||||
|
positiveRatings.Text = ratings.GetRange(ratings.Count / 2, ratings.Count / 2).Sum().ToString();
|
||||||
|
ratingsBar.Length = (float)ratings.GetRange(0, ratings.Count / 2).Sum() / ratings.Sum();
|
||||||
|
|
||||||
|
ratingsGraph.Values = ratings.Select(rating => (float)rating);
|
||||||
|
|
||||||
|
ratingsContainer.FadeColour(Color4.White, 500, EasingTypes.Out);
|
||||||
|
}
|
||||||
|
else if (failOnMissing)
|
||||||
|
ratingsGraph.Values = new float[10];
|
||||||
|
else
|
||||||
|
ratingsContainer.FadeColour(Color4.Gray, 500, EasingTypes.Out);
|
||||||
|
|
||||||
|
if (hasRetriesFails)
|
||||||
|
{
|
||||||
|
var retries = metrics.Retries;
|
||||||
|
var fails = metrics.Fails;
|
||||||
|
retryFailContainer.Show();
|
||||||
|
|
||||||
|
float maxValue = fails.Zip(retries, (fail, retry) => fail + retry).Max();
|
||||||
|
failGraph.MaxValue = maxValue;
|
||||||
|
retryGraph.MaxValue = maxValue;
|
||||||
|
|
||||||
|
failGraph.Values = fails.Select(fail => (float)fail);
|
||||||
|
retryGraph.Values = retries.Zip(fails, (retry, fail) => retry + MathHelper.Clamp(fail, 0, maxValue));
|
||||||
|
|
||||||
|
retryFailContainer.FadeColour(Color4.White, 500, EasingTypes.Out);
|
||||||
|
}
|
||||||
|
else if (failOnMissing)
|
||||||
|
{
|
||||||
|
failGraph.Values = new float[100];
|
||||||
|
retryGraph.Values = new float[100];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
retryFailContainer.FadeColour(Color4.Gray, 500, EasingTypes.Out);
|
||||||
|
}
|
||||||
|
|
||||||
public BeatmapDetails()
|
public BeatmapDetails()
|
||||||
{
|
{
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
@ -113,7 +164,6 @@ namespace osu.Game.Screens.Select
|
|||||||
Direction = FillDirection.Vertical,
|
Direction = FillDirection.Vertical,
|
||||||
LayoutDuration = 200,
|
LayoutDuration = 200,
|
||||||
LayoutEasing = EasingTypes.OutQuint,
|
LayoutEasing = EasingTypes.OutQuint,
|
||||||
Padding = new MarginPadding(10) { Top = 25 },
|
|
||||||
Children = new []
|
Children = new []
|
||||||
{
|
{
|
||||||
description = new MetadataSegment("Description"),
|
description = new MetadataSegment("Description"),
|
||||||
@ -148,8 +198,8 @@ namespace osu.Game.Screens.Select
|
|||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
Direction = FillDirection.Vertical,
|
Direction = FillDirection.Vertical,
|
||||||
Spacing = new Vector2(0,10),
|
Spacing = new Vector2(0,5),
|
||||||
Padding = new MarginPadding(15) { Top = 25 },
|
Padding = new MarginPadding(10),
|
||||||
Children = new []
|
Children = new []
|
||||||
{
|
{
|
||||||
circleSize = new DifficultyRow("Circle Size", 7),
|
circleSize = new DifficultyRow("Circle Size", 7),
|
||||||
@ -252,7 +302,7 @@ namespace osu.Game.Screens.Select
|
|||||||
new Container<BarGraph>
|
new Container<BarGraph>
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Size = new Vector2(1/0.6f, 50),
|
Size = new Vector2(1 / 0.6f, 50),
|
||||||
Children = new[]
|
Children = new[]
|
||||||
{
|
{
|
||||||
retryGraph = new BarGraph
|
retryGraph = new BarGraph
|
||||||
@ -272,9 +322,13 @@ namespace osu.Game.Screens.Select
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private APIAccess api;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colour)
|
private void load(OsuColour colour, APIAccess api)
|
||||||
{
|
{
|
||||||
|
this.api = api;
|
||||||
|
|
||||||
description.AccentColour = colour.GrayB;
|
description.AccentColour = colour.GrayB;
|
||||||
source.AccentColour = colour.GrayB;
|
source.AccentColour = colour.GrayB;
|
||||||
tags.AccentColour = colour.YellowLight;
|
tags.AccentColour = colour.YellowLight;
|
||||||
@ -308,7 +362,7 @@ namespace osu.Game.Screens.Select
|
|||||||
{
|
{
|
||||||
difficultyValue = value;
|
difficultyValue = value;
|
||||||
bar.Length = value / maxValue;
|
bar.Length = value / maxValue;
|
||||||
valueText.Text = value.ToString(CultureInfo.InvariantCulture);
|
valueText.Text = value.ToString("N1", CultureInfo.CurrentCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@ using osu.Framework.Graphics.Containers;
|
|||||||
using osu.Framework.Graphics.Primitives;
|
using osu.Framework.Graphics.Primitives;
|
||||||
using System;
|
using System;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Threading;
|
||||||
using osu.Game.Database;
|
using osu.Game.Database;
|
||||||
using osu.Game.Rulesets.Scoring;
|
using osu.Game.Rulesets.Scoring;
|
||||||
using osu.Game.Online.API;
|
using osu.Game.Online.API;
|
||||||
@ -93,13 +94,18 @@ namespace osu.Game.Screens.Select.Leaderboards
|
|||||||
|
|
||||||
private BeatmapInfo beatmap;
|
private BeatmapInfo beatmap;
|
||||||
|
|
||||||
|
private ScheduledDelegate pendingBeatmapSwitch;
|
||||||
|
|
||||||
public BeatmapInfo Beatmap
|
public BeatmapInfo Beatmap
|
||||||
{
|
{
|
||||||
get { return beatmap; }
|
get { return beatmap; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
beatmap = value;
|
beatmap = value;
|
||||||
Schedule(updateScores);
|
Scores = null;
|
||||||
|
|
||||||
|
pendingBeatmapSwitch?.Cancel();
|
||||||
|
pendingBeatmapSwitch = Schedule(updateScores);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -179,6 +179,7 @@
|
|||||||
<Compile Include="Rulesets\UI\StandardHudOverlay.cs" />
|
<Compile Include="Rulesets\UI\StandardHudOverlay.cs" />
|
||||||
<Compile Include="Online\API\IOnlineComponent.cs" />
|
<Compile Include="Online\API\IOnlineComponent.cs" />
|
||||||
<Compile Include="Online\API\Requests\GetScoresRequest.cs" />
|
<Compile Include="Online\API\Requests\GetScoresRequest.cs" />
|
||||||
|
<Compile Include="Online\API\Requests\GetBeatmapDetailsRequest.cs" />
|
||||||
<Compile Include="Online\API\Requests\GetUserRequest.cs" />
|
<Compile Include="Online\API\Requests\GetUserRequest.cs" />
|
||||||
<Compile Include="Overlays\DragBar.cs" />
|
<Compile Include="Overlays\DragBar.cs" />
|
||||||
<Compile Include="Overlays\LoginOverlay.cs" />
|
<Compile Include="Overlays\LoginOverlay.cs" />
|
||||||
|
Loading…
Reference in New Issue
Block a user