mirror of
https://github.com/osukey/osukey.git
synced 2025-05-26 07:57:32 +09:00
Merge pull request #11698 from Joehuu/centre-player-loader-metadata
Fix player loader metadata not being centred
This commit is contained in:
commit
be0678c031
@ -23,32 +23,6 @@ namespace osu.Game.Screens.Play
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class BeatmapMetadataDisplay : Container
|
public class BeatmapMetadataDisplay : Container
|
||||||
{
|
{
|
||||||
private class MetadataLine : Container
|
|
||||||
{
|
|
||||||
public MetadataLine(string left, string right)
|
|
||||||
{
|
|
||||||
AutoSizeAxes = Axes.Both;
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
new OsuSpriteText
|
|
||||||
{
|
|
||||||
Anchor = Anchor.TopCentre,
|
|
||||||
Origin = Anchor.TopRight,
|
|
||||||
Margin = new MarginPadding { Right = 5 },
|
|
||||||
Colour = OsuColour.Gray(0.8f),
|
|
||||||
Text = left,
|
|
||||||
},
|
|
||||||
new OsuSpriteText
|
|
||||||
{
|
|
||||||
Anchor = Anchor.TopCentre,
|
|
||||||
Origin = Anchor.TopLeft,
|
|
||||||
Margin = new MarginPadding { Left = 5 },
|
|
||||||
Text = string.IsNullOrEmpty(right) ? @"-" : right,
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private readonly WorkingBeatmap beatmap;
|
private readonly WorkingBeatmap beatmap;
|
||||||
private readonly Bindable<IReadOnlyList<Mod>> mods;
|
private readonly Bindable<IReadOnlyList<Mod>> mods;
|
||||||
private readonly Drawable facade;
|
private readonly Drawable facade;
|
||||||
@ -144,15 +118,34 @@ namespace osu.Game.Screens.Play
|
|||||||
Bottom = 40
|
Bottom = 40
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
new MetadataLine("Source", metadata.Source)
|
new GridContainer
|
||||||
{
|
{
|
||||||
Origin = Anchor.TopCentre,
|
|
||||||
Anchor = Anchor.TopCentre,
|
Anchor = Anchor.TopCentre,
|
||||||
},
|
|
||||||
new MetadataLine("Mapper", metadata.AuthorString)
|
|
||||||
{
|
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
Anchor = Anchor.TopCentre,
|
AutoSizeAxes = Axes.Both,
|
||||||
|
RowDimensions = new[]
|
||||||
|
{
|
||||||
|
new Dimension(GridSizeMode.AutoSize),
|
||||||
|
new Dimension(GridSizeMode.AutoSize),
|
||||||
|
},
|
||||||
|
ColumnDimensions = new[]
|
||||||
|
{
|
||||||
|
new Dimension(GridSizeMode.AutoSize),
|
||||||
|
new Dimension(GridSizeMode.AutoSize),
|
||||||
|
},
|
||||||
|
Content = new[]
|
||||||
|
{
|
||||||
|
new Drawable[]
|
||||||
|
{
|
||||||
|
new MetadataLineLabel("Source"),
|
||||||
|
new MetadataLineInfo(metadata.Source)
|
||||||
|
},
|
||||||
|
new Drawable[]
|
||||||
|
{
|
||||||
|
new MetadataLineLabel("Mapper"),
|
||||||
|
new MetadataLineInfo(metadata.AuthorString)
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
new ModDisplay
|
new ModDisplay
|
||||||
{
|
{
|
||||||
@ -168,5 +161,26 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
Loading = true;
|
Loading = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private class MetadataLineLabel : OsuSpriteText
|
||||||
|
{
|
||||||
|
public MetadataLineLabel(string text)
|
||||||
|
{
|
||||||
|
Anchor = Anchor.TopRight;
|
||||||
|
Origin = Anchor.TopRight;
|
||||||
|
Margin = new MarginPadding { Right = 5 };
|
||||||
|
Colour = OsuColour.Gray(0.8f);
|
||||||
|
Text = text;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private class MetadataLineInfo : OsuSpriteText
|
||||||
|
{
|
||||||
|
public MetadataLineInfo(string text)
|
||||||
|
{
|
||||||
|
Margin = new MarginPadding { Left = 5 };
|
||||||
|
Text = string.IsNullOrEmpty(text) ? @"-" : text;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user