mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 00:53:22 +08:00
Merge pull request #7863 from TheWildTree/adjust-beatmap-overlay
Adjust font sizes and spacing in BeatmapSetOverlay to match osu-web values
This commit is contained in:
commit
ab49f88fd9
@ -2,7 +2,6 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Colour;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Game.Graphics;
|
||||
@ -50,7 +49,7 @@ namespace osu.Game.Beatmaps.Drawables
|
||||
Child = new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = ColourInfo.GradientVertical(OsuColour.Gray(0.2f), OsuColour.Gray(0.1f)),
|
||||
Colour = OsuColour.Gray(0.2f),
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -77,7 +77,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
new Container
|
||||
{
|
||||
AutoSizeAxes = Axes.Both,
|
||||
CornerRadius = 3,
|
||||
CornerRadius = 4,
|
||||
Masking = true,
|
||||
Child = avatar = new UpdateableAvatar
|
||||
{
|
||||
@ -88,7 +88,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
{
|
||||
Colour = Color4.Black.Opacity(0.25f),
|
||||
Type = EdgeEffectType.Shadow,
|
||||
Radius = 3,
|
||||
Radius = 4,
|
||||
Offset = new Vector2(0f, 1f),
|
||||
},
|
||||
},
|
||||
@ -118,12 +118,12 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = $"{first} ",
|
||||
Font = OsuFont.GetFont(size: 13)
|
||||
Font = OsuFont.GetFont(size: 11)
|
||||
},
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = second,
|
||||
Font = secondFont.With(size: 13)
|
||||
Font = secondFont.With(size: 11)
|
||||
},
|
||||
};
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
{
|
||||
TooltipText = name;
|
||||
RelativeSizeAxes = Axes.X;
|
||||
AutoSizeAxes = Axes.Y;
|
||||
Height = 24f;
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
@ -113,7 +113,8 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
AutoSizeAxes = Axes.Both,
|
||||
AutoSizeAxes = Axes.X,
|
||||
RelativeSizeAxes = Axes.Y,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new SpriteIcon
|
||||
@ -121,7 +122,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.Centre,
|
||||
Icon = FontAwesome.Solid.Square,
|
||||
Size = new Vector2(13),
|
||||
Size = new Vector2(12),
|
||||
Rotation = 45,
|
||||
Colour = OsuColour.FromHex(@"441288"),
|
||||
},
|
||||
@ -130,7 +131,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.Centre,
|
||||
Icon = icon,
|
||||
Size = new Vector2(13),
|
||||
Size = new Vector2(12),
|
||||
Colour = OsuColour.FromHex(@"f7dd55"),
|
||||
Scale = new Vector2(0.8f),
|
||||
},
|
||||
@ -139,7 +140,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.CentreLeft,
|
||||
Margin = new MarginPadding { Left = 10 },
|
||||
Font = OsuFont.GetFont(size: 13, weight: FontWeight.Bold),
|
||||
Font = OsuFont.GetFont(size: 12, weight: FontWeight.Bold),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -6,7 +6,6 @@ using System.Linq;
|
||||
using osu.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Extensions.Color4Extensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
@ -19,7 +18,6 @@ using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Rulesets;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Overlays.BeatmapSet
|
||||
{
|
||||
@ -34,7 +32,6 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
public readonly DifficultiesContainer Difficulties;
|
||||
|
||||
public readonly Bindable<BeatmapInfo> Beatmap = new Bindable<BeatmapInfo>();
|
||||
|
||||
private BeatmapSetInfo beatmapSet;
|
||||
|
||||
public BeatmapSetInfo BeatmapSet
|
||||
@ -67,7 +64,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Margin = new MarginPadding { Left = -(tile_icon_padding + tile_spacing / 2) },
|
||||
Margin = new MarginPadding { Left = -(tile_icon_padding + tile_spacing / 2), Bottom = 10 },
|
||||
OnLostHover = () =>
|
||||
{
|
||||
showBeatmap(Beatmap.Value);
|
||||
@ -77,7 +74,6 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
new FillFlowContainer
|
||||
{
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Margin = new MarginPadding { Top = 10 },
|
||||
Spacing = new Vector2(5f),
|
||||
Children = new[]
|
||||
{
|
||||
@ -85,13 +81,13 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
{
|
||||
Anchor = Anchor.BottomLeft,
|
||||
Origin = Anchor.BottomLeft,
|
||||
Font = OsuFont.GetFont(size: 20, weight: FontWeight.Bold)
|
||||
Font = OsuFont.GetFont(size: 17, weight: FontWeight.Bold)
|
||||
},
|
||||
starRating = new OsuSpriteText
|
||||
{
|
||||
Anchor = Anchor.BottomLeft,
|
||||
Origin = Anchor.BottomLeft,
|
||||
Font = OsuFont.GetFont(size: 13, weight: FontWeight.Bold),
|
||||
Font = OsuFont.GetFont(size: 11, weight: FontWeight.Bold),
|
||||
Text = "Star Difficulty",
|
||||
Alpha = 0,
|
||||
Margin = new MarginPadding { Bottom = 1 },
|
||||
@ -192,9 +188,11 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
public class DifficultySelectorButton : OsuClickableContainer, IStateful<DifficultySelectorState>
|
||||
{
|
||||
private const float transition_duration = 100;
|
||||
private const float size = 52;
|
||||
private const float size = 54;
|
||||
private const float background_size = size - 2;
|
||||
|
||||
private readonly Container bg;
|
||||
private readonly Container background;
|
||||
private readonly Box backgroundBox;
|
||||
private readonly DifficultyIcon icon;
|
||||
|
||||
public readonly BeatmapInfo Beatmap;
|
||||
@ -230,16 +228,16 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
bg = new Container
|
||||
background = new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Size = new Vector2(background_size),
|
||||
Masking = true,
|
||||
CornerRadius = 4,
|
||||
Child = new Box
|
||||
Child = backgroundBox = new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = Color4.Black.Opacity(0.5f),
|
||||
},
|
||||
Alpha = 0.5f
|
||||
}
|
||||
},
|
||||
icon = new DifficultyIcon(beatmap, shouldShowTooltip: false)
|
||||
{
|
||||
@ -273,15 +271,21 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
|
||||
private void fadeIn()
|
||||
{
|
||||
bg.FadeIn(transition_duration);
|
||||
background.FadeIn(transition_duration);
|
||||
icon.FadeIn(transition_duration);
|
||||
}
|
||||
|
||||
private void fadeOut()
|
||||
{
|
||||
bg.FadeOut();
|
||||
background.FadeOut();
|
||||
icon.FadeTo(0.7f, transition_duration);
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OverlayColourProvider colourProvider)
|
||||
{
|
||||
backgroundBox.Colour = colourProvider.Background6;
|
||||
}
|
||||
}
|
||||
|
||||
private class Statistic : FillFlowContainer
|
||||
@ -314,13 +318,13 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
Origin = Anchor.CentreLeft,
|
||||
Icon = icon,
|
||||
Shadow = true,
|
||||
Size = new Vector2(13),
|
||||
Size = new Vector2(12),
|
||||
},
|
||||
text = new OsuSpriteText
|
||||
{
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.CentreLeft,
|
||||
Font = OsuFont.GetFont(size: 14, weight: FontWeight.SemiBold, italics: true)
|
||||
Font = OsuFont.GetFont(size: 12, weight: FontWeight.SemiBold, italics: true),
|
||||
},
|
||||
};
|
||||
}
|
||||
|
@ -22,6 +22,8 @@ namespace osu.Game.Overlays.BeatmapSet.Buttons
|
||||
{
|
||||
public class HeaderDownloadButton : BeatmapDownloadTrackingComposite, IHasTooltip
|
||||
{
|
||||
private const int text_size = 12;
|
||||
|
||||
private readonly bool noVideo;
|
||||
|
||||
public string TooltipText => button.Enabled.Value ? "download this beatmap" : "login to download";
|
||||
@ -80,8 +82,7 @@ namespace osu.Game.Overlays.BeatmapSet.Buttons
|
||||
Anchor = Anchor.CentreRight,
|
||||
Origin = Anchor.CentreRight,
|
||||
Icon = FontAwesome.Solid.Download,
|
||||
Size = new Vector2(16),
|
||||
Margin = new MarginPadding { Right = 5 },
|
||||
Size = new Vector2(18),
|
||||
},
|
||||
}
|
||||
},
|
||||
@ -120,7 +121,7 @@ namespace osu.Game.Overlays.BeatmapSet.Buttons
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = "Downloading...",
|
||||
Font = OsuFont.GetFont(size: 13, weight: FontWeight.Bold)
|
||||
Font = OsuFont.GetFont(size: text_size, weight: FontWeight.Bold)
|
||||
},
|
||||
};
|
||||
break;
|
||||
@ -131,7 +132,7 @@ namespace osu.Game.Overlays.BeatmapSet.Buttons
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = "Importing...",
|
||||
Font = OsuFont.GetFont(size: 13, weight: FontWeight.Bold)
|
||||
Font = OsuFont.GetFont(size: text_size, weight: FontWeight.Bold)
|
||||
},
|
||||
};
|
||||
break;
|
||||
@ -146,12 +147,12 @@ namespace osu.Game.Overlays.BeatmapSet.Buttons
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = "Download",
|
||||
Font = OsuFont.GetFont(size: 13, weight: FontWeight.Bold)
|
||||
Font = OsuFont.GetFont(size: text_size, weight: FontWeight.Bold)
|
||||
},
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = getVideoSuffixText(),
|
||||
Font = OsuFont.GetFont(size: 11, weight: FontWeight.Bold)
|
||||
Font = OsuFont.GetFont(size: text_size - 2, weight: FontWeight.Bold)
|
||||
},
|
||||
};
|
||||
this.FadeIn(200);
|
||||
|
@ -74,7 +74,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Margin = new MarginPadding { Vertical = 10 },
|
||||
Padding = new MarginPadding { Vertical = 10 }
|
||||
},
|
||||
},
|
||||
new DetailBox
|
||||
|
@ -144,12 +144,15 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
},
|
||||
}
|
||||
},
|
||||
artist = new OsuSpriteText { Font = OsuFont.GetFont(size: 20, weight: FontWeight.Medium, italics: true) },
|
||||
artist = new OsuSpriteText
|
||||
{
|
||||
Font = OsuFont.GetFont(size: 20, weight: FontWeight.Medium, italics: true),
|
||||
Margin = new MarginPadding { Bottom = 20 }
|
||||
},
|
||||
new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Margin = new MarginPadding { Top = 20 },
|
||||
Child = author = new AuthorInfo(),
|
||||
},
|
||||
beatmapAvailability = new BeatmapAvailability(),
|
||||
|
@ -20,8 +20,9 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
public class Info : Container
|
||||
{
|
||||
private const float transition_duration = 250;
|
||||
private const float metadata_width = 225;
|
||||
private const float metadata_width = 175;
|
||||
private const float spacing = 20;
|
||||
private const float base_height = 220;
|
||||
|
||||
private readonly Box successRateBackground;
|
||||
private readonly Box background;
|
||||
@ -41,7 +42,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
OsuSpriteText unrankedPlaceholder;
|
||||
|
||||
RelativeSizeAxes = Axes.X;
|
||||
Height = 220;
|
||||
Height = base_height;
|
||||
Masking = true;
|
||||
EdgeEffect = new EdgeEffectParameters
|
||||
{
|
||||
@ -135,6 +136,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
var setHasLeaderboard = b.NewValue?.OnlineInfo?.Status > 0;
|
||||
successRate.Alpha = setHasLeaderboard ? 1 : 0;
|
||||
unrankedPlaceholder.Alpha = setHasLeaderboard ? 0 : 1;
|
||||
Height = setHasLeaderboard ? 270 : base_height;
|
||||
};
|
||||
}
|
||||
|
||||
@ -176,8 +178,8 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = title,
|
||||
Font = OsuFont.GetFont(size: 14, weight: FontWeight.Black),
|
||||
Margin = new MarginPadding { Top = 20 },
|
||||
Font = OsuFont.GetFont(size: 14, weight: FontWeight.Bold),
|
||||
Margin = new MarginPadding { Top = 15 },
|
||||
},
|
||||
textFlow = new OsuTextFlowContainer
|
||||
{
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
using osu.Game.Screens.Select.Leaderboards;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Framework.Allocation;
|
||||
using osuTK.Graphics;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
@ -37,7 +36,6 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
public ScopeSelectorTabItem(BeatmapLeaderboardScope value)
|
||||
: base(value)
|
||||
{
|
||||
Text.Font = OsuFont.GetFont(size: 16);
|
||||
}
|
||||
|
||||
protected override bool OnHover(HoverEvent e)
|
||||
|
@ -23,7 +23,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
AutoSizeAxes = Axes.Y;
|
||||
|
||||
Masking = true;
|
||||
CornerRadius = 5;
|
||||
CornerRadius = 4;
|
||||
EdgeEffect = new EdgeEffectParameters
|
||||
{
|
||||
Type = EdgeEffectType.Shadow,
|
||||
@ -46,7 +46,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
{
|
||||
Vertical = 10,
|
||||
Left = 10,
|
||||
Right = 25,
|
||||
Right = 30,
|
||||
},
|
||||
Children = new Drawable[]
|
||||
{
|
||||
|
@ -21,7 +21,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
{
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Direction = FillDirection.Vertical,
|
||||
Spacing = new Vector2(0, 10),
|
||||
Spacing = new Vector2(0, 20),
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new OsuSpriteText
|
||||
@ -29,9 +29,9 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
Text = @"You need to be an osu!supporter to access the friend and country rankings!",
|
||||
Font = OsuFont.GetFont(weight: FontWeight.Bold),
|
||||
Font = OsuFont.GetFont(size: 14, weight: FontWeight.Bold),
|
||||
},
|
||||
text = new LinkFlowContainer(t => t.Font = t.Font.With(size: 12))
|
||||
text = new LinkFlowContainer(t => t.Font = t.Font.With(size: 11))
|
||||
{
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
|
@ -22,7 +22,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
public class ScoreTable : TableContainer
|
||||
{
|
||||
private const float horizontal_inset = 20;
|
||||
private const float row_height = 25;
|
||||
private const float row_height = 22;
|
||||
private const int text_size = 12;
|
||||
|
||||
private readonly FillFlowContainer backgroundFlow;
|
||||
@ -63,7 +63,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
return;
|
||||
|
||||
for (int i = 0; i < value.Count; i++)
|
||||
backgroundFlow.Add(new ScoreTableRowBackground(i, value[i]));
|
||||
backgroundFlow.Add(new ScoreTableRowBackground(i, value[i], row_height));
|
||||
|
||||
Columns = createHeaders(value[0]);
|
||||
Content = value.Select((s, i) => createContent(i, s)).ToArray().ToRectangular();
|
||||
@ -77,17 +77,20 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
new TableColumn("rank", Anchor.CentreRight, new Dimension(GridSizeMode.AutoSize)),
|
||||
new TableColumn("", Anchor.Centre, new Dimension(GridSizeMode.Absolute, 70)), // grade
|
||||
new TableColumn("score", Anchor.CentreLeft, new Dimension(GridSizeMode.AutoSize)),
|
||||
new TableColumn("accuracy", Anchor.CentreLeft, new Dimension(GridSizeMode.Distributed, minSize: 60, maxSize: 70)),
|
||||
new TableColumn("player", Anchor.CentreLeft, new Dimension(GridSizeMode.Distributed, minSize: 150)),
|
||||
new TableColumn("max combo", Anchor.CentreLeft, new Dimension(GridSizeMode.Distributed, minSize: 70, maxSize: 110))
|
||||
new TableColumn("accuracy", Anchor.CentreLeft, new Dimension(GridSizeMode.Absolute, minSize: 60, maxSize: 70)),
|
||||
new TableColumn("", Anchor.CentreLeft, new Dimension(GridSizeMode.Absolute, 25)), // flag
|
||||
new TableColumn("player", Anchor.CentreLeft, new Dimension(GridSizeMode.Distributed, minSize: 125)),
|
||||
new TableColumn("max combo", Anchor.CentreLeft, new Dimension(GridSizeMode.Distributed, minSize: 70, maxSize: 120))
|
||||
};
|
||||
|
||||
foreach (var statistic in score.SortedStatistics)
|
||||
columns.Add(new TableColumn(statistic.Key.GetDescription(), Anchor.CentreLeft, new Dimension(GridSizeMode.Distributed, minSize: 50, maxSize: 70)));
|
||||
foreach (var statistic in score.SortedStatistics.Take(score.SortedStatistics.Count() - 1))
|
||||
columns.Add(new TableColumn(statistic.Key.GetDescription(), Anchor.CentreLeft, new Dimension(GridSizeMode.Distributed, minSize: 35, maxSize: 60)));
|
||||
|
||||
columns.Add(new TableColumn(score.SortedStatistics.LastOrDefault().Key.GetDescription(), Anchor.CentreLeft, new Dimension(GridSizeMode.Distributed, minSize: 45, maxSize: 95)));
|
||||
|
||||
columns.AddRange(new[]
|
||||
{
|
||||
new TableColumn("pp", Anchor.CentreLeft, new Dimension(GridSizeMode.Distributed, minSize: 40, maxSize: 70)),
|
||||
new TableColumn("pp", Anchor.CentreLeft, new Dimension(GridSizeMode.Absolute, 30)),
|
||||
new TableColumn("mods", Anchor.CentreLeft, new Dimension(GridSizeMode.AutoSize)),
|
||||
});
|
||||
|
||||
@ -96,6 +99,9 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
|
||||
private Drawable[] createContent(int index, ScoreInfo score)
|
||||
{
|
||||
var username = new LinkFlowContainer(t => t.Font = OsuFont.GetFont(size: text_size)) { AutoSizeAxes = Axes.Both };
|
||||
username.AddUserLink(score.User);
|
||||
|
||||
var content = new List<Drawable>
|
||||
{
|
||||
new OsuSpriteText
|
||||
@ -105,7 +111,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
},
|
||||
new UpdateableRank(score.Rank)
|
||||
{
|
||||
Size = new Vector2(30, 20)
|
||||
Size = new Vector2(28, 14)
|
||||
},
|
||||
new OsuSpriteText
|
||||
{
|
||||
@ -120,36 +126,19 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
Font = OsuFont.GetFont(size: text_size),
|
||||
Colour = score.Accuracy == 1 ? highAccuracyColour : Color4.White
|
||||
},
|
||||
};
|
||||
|
||||
var username = new LinkFlowContainer(t => t.Font = OsuFont.GetFont(size: text_size)) { AutoSizeAxes = Axes.Both };
|
||||
username.AddUserLink(score.User);
|
||||
|
||||
content.AddRange(new Drawable[]
|
||||
{
|
||||
new FillFlowContainer
|
||||
new UpdateableFlag(score.User.Country)
|
||||
{
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Direction = FillDirection.Horizontal,
|
||||
Margin = new MarginPadding { Right = horizontal_inset },
|
||||
Spacing = new Vector2(5, 0),
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new UpdateableFlag(score.User.Country)
|
||||
{
|
||||
Size = new Vector2(20, 13),
|
||||
ShowPlaceholderOnNull = false,
|
||||
},
|
||||
username
|
||||
}
|
||||
Size = new Vector2(19, 13),
|
||||
ShowPlaceholderOnNull = false,
|
||||
},
|
||||
username,
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = $@"{score.MaxCombo:N0}x",
|
||||
Font = OsuFont.GetFont(size: text_size),
|
||||
Colour = score.MaxCombo == score.Beatmap?.MaxCombo ? highAccuracyColour : Color4.White
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
foreach (var kvp in score.SortedStatistics)
|
||||
{
|
||||
|
@ -22,13 +22,13 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
private readonly int index;
|
||||
private readonly ScoreInfo score;
|
||||
|
||||
public ScoreTableRowBackground(int index, ScoreInfo score)
|
||||
public ScoreTableRowBackground(int index, ScoreInfo score, float height)
|
||||
{
|
||||
this.index = index;
|
||||
this.score = score;
|
||||
|
||||
RelativeSizeAxes = Axes.X;
|
||||
Height = 25;
|
||||
Height = height;
|
||||
|
||||
CornerRadius = 5;
|
||||
Masking = true;
|
||||
|
@ -90,9 +90,9 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
Origin = Anchor.TopCentre,
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Width = 0.95f,
|
||||
Direction = FillDirection.Vertical,
|
||||
Margin = new MarginPadding { Vertical = spacing },
|
||||
Padding = new MarginPadding { Horizontal = 50 },
|
||||
Margin = new MarginPadding { Vertical = 20 },
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new FillFlowContainer
|
||||
@ -121,7 +121,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
{
|
||||
AutoSizeAxes = Axes.Y,
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Margin = new MarginPadding { Vertical = spacing },
|
||||
Margin = new MarginPadding { Top = spacing },
|
||||
Children = new Drawable[]
|
||||
{
|
||||
noScoresPlaceholder = new NoScoresPlaceholder
|
||||
|
@ -27,7 +27,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
private const float bottom_columns_min_width = 45;
|
||||
|
||||
private readonly FontUsage smallFont = OsuFont.GetFont(size: 16);
|
||||
private readonly FontUsage largeFont = OsuFont.GetFont(size: 22);
|
||||
private readonly FontUsage largeFont = OsuFont.GetFont(size: 22, weight: FontWeight.Light);
|
||||
|
||||
private readonly TextColumn totalScoreColumn;
|
||||
private readonly TextColumn accuracyColumn;
|
||||
@ -47,7 +47,6 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Direction = FillDirection.Vertical,
|
||||
Spacing = new Vector2(10, 8),
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new FillFlowContainer
|
||||
@ -117,6 +116,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
public InfoColumn(string title, Drawable content, float? minWidth = null)
|
||||
{
|
||||
AutoSizeAxes = Axes.Both;
|
||||
Margin = new MarginPadding { Vertical = 5 };
|
||||
|
||||
InternalChild = new GridContainer
|
||||
{
|
||||
@ -128,7 +128,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
RowDimensions = new[]
|
||||
{
|
||||
new Dimension(GridSizeMode.AutoSize),
|
||||
new Dimension(GridSizeMode.Absolute, 4),
|
||||
new Dimension(GridSizeMode.Absolute, 2),
|
||||
new Dimension(GridSizeMode.AutoSize)
|
||||
},
|
||||
Content = new[]
|
||||
@ -138,21 +138,24 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
text = new OsuSpriteText
|
||||
{
|
||||
Font = OsuFont.GetFont(size: 10, weight: FontWeight.Bold),
|
||||
Text = title.ToUpper()
|
||||
Text = title.ToUpper(),
|
||||
// 2px padding bottom + 1px vertical to compensate for the additional spacing because of 1.25 line-height in osu-web
|
||||
Padding = new MarginPadding { Top = 1, Bottom = 3 }
|
||||
}
|
||||
},
|
||||
new Drawable[]
|
||||
{
|
||||
separator = new Box
|
||||
{
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Anchor = Anchor.TopLeft,
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Height = 2
|
||||
}
|
||||
Height = 2,
|
||||
},
|
||||
},
|
||||
new[]
|
||||
{
|
||||
content
|
||||
// osu-web has 4px margin here but also uses 0.9 line-height, reducing margin to 2px seems like a good alternative to that
|
||||
content.With(c => c.Margin = new MarginPadding { Top = 2 })
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -194,9 +197,10 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
public ModsInfoColumn()
|
||||
: this(new FillFlowContainer
|
||||
{
|
||||
AutoSizeAxes = Axes.Both,
|
||||
AutoSizeAxes = Axes.X,
|
||||
Direction = FillDirection.Horizontal,
|
||||
Spacing = new Vector2(1),
|
||||
Height = 18f
|
||||
})
|
||||
{
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
Origin = Anchor.Centre,
|
||||
Size = new Vector2(70),
|
||||
Masking = true,
|
||||
CornerRadius = 5,
|
||||
CornerRadius = 4,
|
||||
EdgeEffect = new EdgeEffectParameters
|
||||
{
|
||||
Type = EdgeEffectType.Shadow,
|
||||
|
@ -65,7 +65,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
Text = "Success Rate",
|
||||
Font = OsuFont.GetFont(size: 13)
|
||||
Font = OsuFont.GetFont(size: 12)
|
||||
},
|
||||
successRate = new Bar
|
||||
{
|
||||
@ -82,7 +82,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
{
|
||||
Anchor = Anchor.TopRight,
|
||||
Origin = Anchor.TopCentre,
|
||||
Font = OsuFont.GetFont(size: 13),
|
||||
Font = OsuFont.GetFont(size: 12),
|
||||
},
|
||||
},
|
||||
new OsuSpriteText
|
||||
@ -90,7 +90,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
Text = "Points of Failure",
|
||||
Font = OsuFont.GetFont(size: 13),
|
||||
Font = OsuFont.GetFont(size: 12),
|
||||
Margin = new MarginPadding { Vertical = 20 },
|
||||
},
|
||||
},
|
||||
|
@ -1,7 +1,6 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Extensions.Color4Extensions;
|
||||
@ -51,7 +50,6 @@ namespace osu.Game.Screens.Select.Details
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Spacing = new Vector2(4f),
|
||||
Children = new[]
|
||||
{
|
||||
FirstValue = new StatisticRow(), //circle size/key amount
|
||||
@ -199,6 +197,7 @@ namespace osu.Game.Screens.Select.Details
|
||||
this.forceDecimalPlaces = forceDecimalPlaces;
|
||||
RelativeSizeAxes = Axes.X;
|
||||
AutoSizeAxes = Axes.Y;
|
||||
Padding = new MarginPadding { Vertical = 2.5f };
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
@ -206,9 +205,11 @@ namespace osu.Game.Screens.Select.Details
|
||||
{
|
||||
Width = name_width,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
// osu-web uses 1.25 line-height, which at 12px font size makes the element 14px tall - this compentates that difference
|
||||
Padding = new MarginPadding { Vertical = 1 },
|
||||
Child = name = new OsuSpriteText
|
||||
{
|
||||
Font = OsuFont.GetFont(size: 13)
|
||||
Font = OsuFont.GetFont(size: 12)
|
||||
},
|
||||
},
|
||||
bar = new Bar
|
||||
@ -239,7 +240,7 @@ namespace osu.Game.Screens.Select.Details
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Font = OsuFont.GetFont(size: 13)
|
||||
Font = OsuFont.GetFont(size: 12)
|
||||
},
|
||||
},
|
||||
};
|
||||
|
@ -71,31 +71,32 @@ namespace osu.Game.Screens.Select.Details
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
Text = "User Rating",
|
||||
Font = OsuFont.GetFont(size: 13)
|
||||
Font = OsuFont.GetFont(size: 12),
|
||||
Margin = new MarginPadding { Bottom = 5 },
|
||||
},
|
||||
ratingsBar = new Bar
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Height = 5,
|
||||
Margin = new MarginPadding { Top = 5 },
|
||||
},
|
||||
new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Margin = new MarginPadding { Bottom = 10 },
|
||||
Children = new[]
|
||||
{
|
||||
negativeRatings = new OsuSpriteText
|
||||
{
|
||||
Text = "0",
|
||||
Font = OsuFont.GetFont(size: 13)
|
||||
Font = OsuFont.GetFont(size: 12)
|
||||
},
|
||||
positiveRatings = new OsuSpriteText
|
||||
{
|
||||
Anchor = Anchor.TopRight,
|
||||
Origin = Anchor.TopRight,
|
||||
Text = @"0",
|
||||
Font = OsuFont.GetFont(size: 13)
|
||||
Font = OsuFont.GetFont(size: 12)
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -104,8 +105,8 @@ namespace osu.Game.Screens.Select.Details
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
Text = "Rating Spread",
|
||||
Font = OsuFont.GetFont(size: 13),
|
||||
Margin = new MarginPadding { Top = 10, Bottom = 5 },
|
||||
Font = OsuFont.GetFont(size: 12),
|
||||
Margin = new MarginPadding { Bottom = 5 },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user