mirror of
https://github.com/ppy/osu.git
synced 2025-03-17 22:17:25 +08:00
ratings hide now + remove unnessary stuff
This commit is contained in:
parent
65d9f4fc45
commit
899e559b5c
@ -19,7 +19,6 @@ namespace osu.Game.Screens.Select
|
||||
|
||||
public readonly BeatmapDetails Details;
|
||||
public readonly Leaderboard Leaderboard;
|
||||
private BeatmapDetailTab currentTab;
|
||||
|
||||
private APIAccess api;
|
||||
|
||||
@ -60,8 +59,6 @@ namespace osu.Game.Screens.Select
|
||||
updateScores();
|
||||
break;
|
||||
}
|
||||
currentTab = tab;
|
||||
updateDetails();
|
||||
},
|
||||
},
|
||||
content = new Container
|
||||
|
@ -31,6 +31,7 @@ namespace osu.Game.Screens.Select
|
||||
private readonly DifficultyRow approachRate;
|
||||
private readonly DifficultyRow stars;
|
||||
|
||||
private readonly Container ratingsContainer;
|
||||
private readonly Bar ratingsBar;
|
||||
private readonly OsuSpriteText negativeRatings;
|
||||
private readonly OsuSpriteText positiveRatings;
|
||||
@ -40,7 +41,6 @@ namespace osu.Game.Screens.Select
|
||||
private readonly BarGraph failGraph;
|
||||
|
||||
private BeatmapInfo beatmap;
|
||||
|
||||
public BeatmapInfo Beatmap
|
||||
{
|
||||
get
|
||||
@ -66,7 +66,6 @@ namespace osu.Game.Screens.Select
|
||||
}
|
||||
|
||||
private List<int> ratings;
|
||||
|
||||
public IEnumerable<int> Ratings
|
||||
{
|
||||
get
|
||||
@ -76,11 +75,17 @@ namespace osu.Game.Screens.Select
|
||||
set
|
||||
{
|
||||
ratings = value.ToList();
|
||||
negativeRatings.Text = ratings.GetRange(0, 5).Sum().ToString();
|
||||
positiveRatings.Text = ratings.GetRange(5, 5).Sum().ToString();
|
||||
ratingsBar.Length = (float)ratings.GetRange(0, 5).Sum() / ratings.Sum();
|
||||
if(ratings.Count == 0)
|
||||
ratingsContainer.FadeOut(250);
|
||||
else
|
||||
{
|
||||
ratingsContainer.FadeIn(250);
|
||||
negativeRatings.Text = ratings.GetRange(0, 5).Sum().ToString();
|
||||
positiveRatings.Text = ratings.GetRange(5, 5).Sum().ToString();
|
||||
ratingsBar.Length = (float)ratings.GetRange(0, 5).Sum() / ratings.Sum();
|
||||
|
||||
ratingsGraph.Values = ratings.Select(rating => (float)rating);
|
||||
ratingsGraph.Values = ratings.Select(rating => (float)rating);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -227,10 +232,12 @@ namespace osu.Game.Screens.Select
|
||||
},
|
||||
},
|
||||
},
|
||||
new Container
|
||||
ratingsContainer = new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Alpha = 0,
|
||||
AlwaysPresent = true,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new Box
|
||||
|
@ -385,9 +385,7 @@
|
||||
</None>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Screens\Select\Details\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup />
|
||||
<ItemGroup />
|
||||
<ItemGroup />
|
||||
|
Loading…
x
Reference in New Issue
Block a user