mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 15:44:04 +09:00
Merge branch 'master' of https://github.com/ppy/osu into andy840119/_20190614_hidden_nod_label_when_empty
This commit is contained in:
@ -50,7 +50,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
|
||||
private void updateDisplay()
|
||||
{
|
||||
bpm.Value = BeatmapSet?.OnlineInfo.BPM.ToString(@"0.##") ?? "-";
|
||||
bpm.Value = BeatmapSet?.OnlineInfo?.BPM.ToString(@"0.##") ?? "-";
|
||||
|
||||
if (beatmap == null)
|
||||
{
|
||||
|
@ -16,10 +16,11 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
{
|
||||
public class Details : FillFlowContainer
|
||||
{
|
||||
protected readonly UserRatings Ratings;
|
||||
|
||||
private readonly PreviewButton preview;
|
||||
private readonly BasicStats basic;
|
||||
private readonly AdvancedStats advanced;
|
||||
private readonly UserRatings ratings;
|
||||
|
||||
private BeatmapSetInfo beatmapSet;
|
||||
|
||||
@ -33,6 +34,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
beatmapSet = value;
|
||||
|
||||
basic.BeatmapSet = preview.BeatmapSet = BeatmapSet;
|
||||
updateDisplay();
|
||||
}
|
||||
}
|
||||
|
||||
@ -46,13 +48,12 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
if (value == beatmap) return;
|
||||
|
||||
basic.Beatmap = advanced.Beatmap = beatmap = value;
|
||||
updateDisplay();
|
||||
}
|
||||
}
|
||||
|
||||
private void updateDisplay()
|
||||
{
|
||||
ratings.Metrics = Beatmap?.Metrics;
|
||||
Ratings.Metrics = BeatmapSet?.Metrics;
|
||||
}
|
||||
|
||||
public Details()
|
||||
@ -87,7 +88,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
},
|
||||
new DetailBox
|
||||
{
|
||||
Child = ratings = new UserRatings
|
||||
Child = Ratings = new UserRatings
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Height = 95,
|
||||
|
@ -14,11 +14,12 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
{
|
||||
public class SuccessRate : Container
|
||||
{
|
||||
protected readonly FailRetryGraph Graph;
|
||||
|
||||
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;
|
||||
|
||||
@ -37,15 +38,15 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
|
||||
private void updateDisplay()
|
||||
{
|
||||
int passCount = beatmap?.OnlineInfo.PassCount ?? 0;
|
||||
int playCount = beatmap?.OnlineInfo.PlayCount ?? 0;
|
||||
int passCount = beatmap?.OnlineInfo?.PassCount ?? 0;
|
||||
int playCount = beatmap?.OnlineInfo?.PlayCount ?? 0;
|
||||
|
||||
var rate = playCount != 0 ? (float)passCount / playCount : 0;
|
||||
successPercent.Text = rate.ToString("P0");
|
||||
successRate.Length = rate;
|
||||
percentContainer.ResizeWidthTo(successRate.Length, 250, Easing.InOutCubic);
|
||||
|
||||
graph.Metrics = beatmap?.Metrics;
|
||||
Graph.Metrics = beatmap?.Metrics;
|
||||
}
|
||||
|
||||
public SuccessRate()
|
||||
@ -94,7 +95,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
},
|
||||
},
|
||||
},
|
||||
graph = new FailRetryGraph
|
||||
Graph = new FailRetryGraph
|
||||
{
|
||||
Anchor = Anchor.BottomLeft,
|
||||
Origin = Anchor.BottomLeft,
|
||||
@ -117,7 +118,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
{
|
||||
base.UpdateAfterChildren();
|
||||
|
||||
graph.Padding = new MarginPadding { Top = header.DrawHeight };
|
||||
Graph.Padding = new MarginPadding { Top = header.DrawHeight };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ namespace osu.Game.Overlays
|
||||
|
||||
private RulesetStore rulesets;
|
||||
|
||||
private readonly ScrollContainer scroll;
|
||||
private readonly OsuScrollContainer scroll;
|
||||
|
||||
private readonly Bindable<BeatmapSetInfo> beatmapSet = new Bindable<BeatmapSetInfo>();
|
||||
|
||||
@ -49,7 +49,7 @@ namespace osu.Game.Overlays
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = OsuColour.Gray(0.2f)
|
||||
},
|
||||
scroll = new ScrollContainer
|
||||
scroll = new OsuScrollContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
ScrollbarVisible = false,
|
||||
|
@ -51,7 +51,7 @@ namespace osu.Game.Overlays
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = colour.PurpleDarkAlternative,
|
||||
},
|
||||
new ScrollContainer
|
||||
new OsuScrollContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
ScrollbarVisible = false,
|
||||
|
@ -18,7 +18,7 @@ namespace osu.Game.Overlays.Chat
|
||||
{
|
||||
public readonly Channel Channel;
|
||||
protected readonly ChatLineContainer ChatLineFlow;
|
||||
private readonly ScrollContainer scroll;
|
||||
private readonly OsuScrollContainer scroll;
|
||||
|
||||
public DrawableChannel(Channel channel)
|
||||
{
|
||||
|
@ -464,12 +464,26 @@ namespace osu.Game.Overlays
|
||||
|
||||
private class MusicIconButton : IconButton
|
||||
{
|
||||
public MusicIconButton()
|
||||
{
|
||||
AutoSizeAxes = Axes.Both;
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
HoverColour = colours.YellowDark.Opacity(0.6f);
|
||||
FlashColour = colours.Yellow;
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
// works with AutoSizeAxes above to make buttons autosize with the scale animation.
|
||||
Content.AutoSizeAxes = Axes.None;
|
||||
Content.Size = new Vector2(DEFAULT_BUTTON_SIZE);
|
||||
}
|
||||
}
|
||||
|
||||
private class Background : BufferedContainer
|
||||
|
@ -11,6 +11,7 @@ using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Framework.Threading;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Overlays.Toolbar;
|
||||
|
||||
namespace osu.Game.Overlays.Settings
|
||||
@ -76,7 +77,7 @@ namespace osu.Game.Overlays.Settings
|
||||
return base.OnMouseMove(e);
|
||||
}
|
||||
|
||||
private class SidebarScrollContainer : ScrollContainer
|
||||
private class SidebarScrollContainer : OsuScrollContainer
|
||||
{
|
||||
public SidebarScrollContainer()
|
||||
{
|
||||
|
Reference in New Issue
Block a user