mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 09:07:25 +08:00
Cleanup, remove unneeded files.
This commit is contained in:
parent
2153865de5
commit
109531b66c
@ -17,7 +17,7 @@ namespace osu.Game.Screens.Select.Details
|
|||||||
{
|
{
|
||||||
public class AdvancedStats : Container
|
public class AdvancedStats : Container
|
||||||
{
|
{
|
||||||
private readonly StatRow firstValue, hpDrain, accuracy, approachRate, starDifficulty;
|
private readonly StatisticRow firstValue, hpDrain, accuracy, approachRate, starDifficulty;
|
||||||
|
|
||||||
private BeatmapInfo beatmap;
|
private BeatmapInfo beatmap;
|
||||||
public BeatmapInfo Beatmap
|
public BeatmapInfo Beatmap
|
||||||
@ -56,11 +56,11 @@ namespace osu.Game.Screens.Select.Details
|
|||||||
Spacing = new Vector2(4f),
|
Spacing = new Vector2(4f),
|
||||||
Children = new[]
|
Children = new[]
|
||||||
{
|
{
|
||||||
firstValue = new StatRow(), //circle size/key amount
|
firstValue = new StatisticRow(), //circle size/key amount
|
||||||
hpDrain = new StatRow { Title = "HP Drain" },
|
hpDrain = new StatisticRow { Title = "HP Drain" },
|
||||||
accuracy = new StatRow { Title = "Accuracy" },
|
accuracy = new StatisticRow { Title = "Accuracy" },
|
||||||
approachRate = new StatRow { Title = "Approach Rate" },
|
approachRate = new StatisticRow { Title = "Approach Rate" },
|
||||||
starDifficulty = new StatRow(10, true) { Title = "Star Difficulty" },
|
starDifficulty = new StatisticRow(10, true) { Title = "Star Difficulty" },
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -71,7 +71,7 @@ namespace osu.Game.Screens.Select.Details
|
|||||||
starDifficulty.AccentColour = colours.Yellow;
|
starDifficulty.AccentColour = colours.Yellow;
|
||||||
}
|
}
|
||||||
|
|
||||||
private class StatRow : Container, IHasAccentColour
|
private class StatisticRow : Container, IHasAccentColour
|
||||||
{
|
{
|
||||||
private const float value_width = 25;
|
private const float value_width = 25;
|
||||||
private const float name_width = 70;
|
private const float name_width = 70;
|
||||||
@ -105,7 +105,7 @@ namespace osu.Game.Screens.Select.Details
|
|||||||
set { bar.AccentColour = value; }
|
set { bar.AccentColour = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public StatRow(float maxValue = 10, bool forceDecimalPlaces = false)
|
public StatisticRow(float maxValue = 10, bool forceDecimalPlaces = false)
|
||||||
{
|
{
|
||||||
this.maxValue = maxValue;
|
this.maxValue = maxValue;
|
||||||
this.forceDecimalPlaces = forceDecimalPlaces;
|
this.forceDecimalPlaces = forceDecimalPlaces;
|
||||||
|
@ -1,120 +0,0 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
||||||
|
|
||||||
using OpenTK;
|
|
||||||
using osu.Framework.Allocation;
|
|
||||||
using osu.Framework.Graphics;
|
|
||||||
using osu.Framework.Graphics.Containers;
|
|
||||||
using osu.Framework.Graphics.Cursor;
|
|
||||||
using osu.Game.Beatmaps;
|
|
||||||
using osu.Game.Graphics;
|
|
||||||
using osu.Game.Graphics.Sprites;
|
|
||||||
|
|
||||||
namespace osu.Game.Screens.Select.Details
|
|
||||||
{
|
|
||||||
public class BasicStats : Container
|
|
||||||
{
|
|
||||||
private const float stat_count = 4;
|
|
||||||
|
|
||||||
private readonly Statistic length, bpm, circleCount, sliderCount;
|
|
||||||
|
|
||||||
private BeatmapInfo beatmap;
|
|
||||||
public BeatmapInfo Beatmap
|
|
||||||
{
|
|
||||||
get { return beatmap; }
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (value == beatmap) return;
|
|
||||||
beatmap = value;
|
|
||||||
|
|
||||||
//length.Value = TimeSpan.FromMilliseconds(Beatmap.OnlineInfo.Length).ToString(@"m\:ss");
|
|
||||||
//bpm.Value = Beatmap.BeatmapSet.OnlineInfo.BPM.ToString(@"0.##");
|
|
||||||
//circleCount.Value = string.Format(@"{0:n0}", beatmap.OnlineInfo.CircleCount);
|
|
||||||
//sliderCount.Value = string.Format(@"{0:n0}", beatmap.OnlineInfo.SliderCount);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public BasicStats()
|
|
||||||
{
|
|
||||||
var statWidth = 1 / stat_count;
|
|
||||||
Child = new FillFlowContainer
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.X,
|
|
||||||
AutoSizeAxes = Axes.Y,
|
|
||||||
Direction = FillDirection.Horizontal,
|
|
||||||
Children = new[]
|
|
||||||
{
|
|
||||||
length = new Statistic(FontAwesome.fa_clock_o, "Length") { Width = statWidth },
|
|
||||||
bpm = new Statistic(FontAwesome.fa_circle, "BPM") { Width = statWidth },
|
|
||||||
circleCount = new Statistic(FontAwesome.fa_circle_o, "Circle Count") { Width = statWidth },
|
|
||||||
sliderCount = new Statistic(FontAwesome.fa_circle, "Slider Count") { Width = statWidth },
|
|
||||||
},
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
private class Statistic : Container, IHasTooltip
|
|
||||||
{
|
|
||||||
private readonly string name;
|
|
||||||
private readonly OsuSpriteText value;
|
|
||||||
|
|
||||||
public string TooltipText => name;
|
|
||||||
public string Value
|
|
||||||
{
|
|
||||||
get { return value.Text; }
|
|
||||||
set { this.value.Text = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public Statistic(FontAwesome icon, string name)
|
|
||||||
{
|
|
||||||
this.name = name;
|
|
||||||
RelativeSizeAxes = Axes.X;
|
|
||||||
AutoSizeAxes = Axes.Y;
|
|
||||||
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
new Container
|
|
||||||
{
|
|
||||||
Anchor = Anchor.Centre,
|
|
||||||
Origin = Anchor.Centre,
|
|
||||||
AutoSizeAxes = Axes.Both,
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
new SpriteIcon
|
|
||||||
{
|
|
||||||
Anchor = Anchor.CentreLeft,
|
|
||||||
Origin = Anchor.Centre,
|
|
||||||
Icon = FontAwesome.fa_square,
|
|
||||||
Size = new Vector2(13),
|
|
||||||
Rotation = 45,
|
|
||||||
Colour = OsuColour.FromHex(@"441288"),
|
|
||||||
},
|
|
||||||
new SpriteIcon
|
|
||||||
{
|
|
||||||
Anchor = Anchor.CentreLeft,
|
|
||||||
Origin = Anchor.Centre,
|
|
||||||
Icon = icon,
|
|
||||||
Size = new Vector2(13),
|
|
||||||
Colour = OsuColour.FromHex(@"f7dd55"),
|
|
||||||
Scale = new Vector2(0.8f),
|
|
||||||
},
|
|
||||||
value = new OsuSpriteText
|
|
||||||
{
|
|
||||||
Anchor = Anchor.CentreLeft,
|
|
||||||
Origin = Anchor.CentreLeft,
|
|
||||||
TextSize = 13,
|
|
||||||
Font = @"Exo2.0-Bold",
|
|
||||||
Margin = new MarginPadding { Left = 10 },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
|
||||||
private void load(OsuColour colour)
|
|
||||||
{
|
|
||||||
value.Colour = colour.Yellow;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,114 +0,0 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
||||||
|
|
||||||
using osu.Framework.Allocation;
|
|
||||||
using osu.Framework.Graphics;
|
|
||||||
using osu.Framework.Graphics.Containers;
|
|
||||||
using osu.Game.Graphics;
|
|
||||||
using osu.Game.Graphics.Sprites;
|
|
||||||
using osu.Game.Graphics.UserInterface;
|
|
||||||
using osu.Game.Beatmaps;
|
|
||||||
|
|
||||||
namespace osu.Game.Screens.Select.Details
|
|
||||||
{
|
|
||||||
public class SuccessRate : Container
|
|
||||||
{
|
|
||||||
private readonly FillFlowContainer header;
|
|
||||||
private readonly OsuSpriteText successRateLabel, successPercent, graphLabel;
|
|
||||||
private readonly Bar successRate;
|
|
||||||
private readonly Container percentContainer;
|
|
||||||
private readonly FailRetryGraph graph;
|
|
||||||
|
|
||||||
private BeatmapInfo beatmap;
|
|
||||||
public BeatmapInfo Beatmap
|
|
||||||
{
|
|
||||||
get { return beatmap; }
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (value == beatmap) return;
|
|
||||||
beatmap = value;
|
|
||||||
|
|
||||||
//successPercent.Text = $"{beatmap.OnlineInfo.SuccessRate}%";
|
|
||||||
//successRate.Length = (float)beatmap.OnlineInfo.SuccessRate / 100f;
|
|
||||||
|
|
||||||
graph.Metrics = Beatmap.Metrics;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public SuccessRate()
|
|
||||||
{
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
header = new FillFlowContainer
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.X,
|
|
||||||
AutoSizeAxes = Axes.Y,
|
|
||||||
Direction = FillDirection.Vertical,
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
successRateLabel = new OsuSpriteText
|
|
||||||
{
|
|
||||||
Anchor = Anchor.TopCentre,
|
|
||||||
Origin = Anchor.TopCentre,
|
|
||||||
Text = "Success Rate",
|
|
||||||
TextSize = 13,
|
|
||||||
},
|
|
||||||
successRate = new Bar
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.X,
|
|
||||||
Height = 5,
|
|
||||||
Margin = new MarginPadding { Top = 5 },
|
|
||||||
},
|
|
||||||
percentContainer = new Container
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.X,
|
|
||||||
AutoSizeAxes = Axes.Y,
|
|
||||||
Child = successPercent = new OsuSpriteText
|
|
||||||
{
|
|
||||||
Anchor = Anchor.TopRight,
|
|
||||||
Origin = Anchor.TopCentre,
|
|
||||||
TextSize = 13,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
graphLabel = new OsuSpriteText
|
|
||||||
{
|
|
||||||
Anchor = Anchor.TopCentre,
|
|
||||||
Origin = Anchor.TopCentre,
|
|
||||||
Text = "Points of Failure",
|
|
||||||
TextSize = 13,
|
|
||||||
Margin = new MarginPadding { Vertical = 20 },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
graph = new FailRetryGraph
|
|
||||||
{
|
|
||||||
Anchor = Anchor.BottomLeft,
|
|
||||||
Origin = Anchor.BottomLeft,
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
|
||||||
private void load(OsuColour colours)
|
|
||||||
{
|
|
||||||
successRateLabel.Colour = successPercent.Colour = graphLabel.Colour = colours.Gray5;
|
|
||||||
successRate.AccentColour = colours.Green;
|
|
||||||
successRate.BackgroundColour = colours.GrayD;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void UpdateAfterChildren()
|
|
||||||
{
|
|
||||||
base.UpdateAfterChildren();
|
|
||||||
|
|
||||||
graph.Padding = new MarginPadding { Top = header.DrawHeight };
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Update()
|
|
||||||
{
|
|
||||||
base.Update();
|
|
||||||
|
|
||||||
percentContainer.Width = successRate.Length;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -539,9 +539,7 @@
|
|||||||
<Compile Include="Screens\Multiplayer\ModeTypeInfo.cs" />
|
<Compile Include="Screens\Multiplayer\ModeTypeInfo.cs" />
|
||||||
<Compile Include="Beatmaps\Drawables\BeatmapSetCover.cs" />
|
<Compile Include="Beatmaps\Drawables\BeatmapSetCover.cs" />
|
||||||
<Compile Include="Screens\Select\Details\AdvancedStats.cs" />
|
<Compile Include="Screens\Select\Details\AdvancedStats.cs" />
|
||||||
<Compile Include="Screens\Select\Details\BasicStats.cs" />
|
|
||||||
<Compile Include="Screens\Select\Details\FailRetryGraph.cs" />
|
<Compile Include="Screens\Select\Details\FailRetryGraph.cs" />
|
||||||
<Compile Include="Screens\Select\Details\SuccessRate.cs" />
|
|
||||||
<Compile Include="Screens\Select\Details\UserRatings.cs" />
|
<Compile Include="Screens\Select\Details\UserRatings.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
Loading…
Reference in New Issue
Block a user