mirror of
https://github.com/ppy/osu.git
synced 2025-01-31 05:32:57 +08:00
Address issues that joehuu brought up
This commit is contained in:
parent
7510201804
commit
74b72e4ac0
@ -38,7 +38,7 @@ namespace osu.Game.Tests.Visual.SongSelect
|
|||||||
|
|
||||||
Add(infoWedge = new TestBeatmapInfoWedgeV2
|
Add(infoWedge = new TestBeatmapInfoWedgeV2
|
||||||
{
|
{
|
||||||
Size = new Vector2(0.6f, 120),
|
Width = 0.6f,
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Margin = new MarginPadding { Top = 20 }
|
Margin = new MarginPadding { Top = 20 }
|
||||||
});
|
});
|
||||||
|
@ -31,6 +31,7 @@ namespace osu.Game.Screens.Select
|
|||||||
private const float wedge_height = 120;
|
private const float wedge_height = 120;
|
||||||
private const float transition_duration = 250;
|
private const float transition_duration = 250;
|
||||||
private const float corner_radius = 10;
|
private const float corner_radius = 10;
|
||||||
|
private const float colour_bar_width = 30;
|
||||||
|
|
||||||
/// Todo: move this const out to song select when more new design elements are implemented for the beatmap details area, since it applies to text alignment of various elements
|
/// Todo: move this const out to song select when more new design elements are implemented for the beatmap details area, since it applies to text alignment of various elements
|
||||||
private const float text_margin = 62;
|
private const float text_margin = 62;
|
||||||
@ -49,6 +50,7 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
public BeatmapInfoWedgeV2()
|
public BeatmapInfoWedgeV2()
|
||||||
{
|
{
|
||||||
|
Height = wedge_height;
|
||||||
Shear = wedged_container_shear;
|
Shear = wedged_container_shear;
|
||||||
Masking = true;
|
Masking = true;
|
||||||
EdgeEffect = new EdgeEffectParameters
|
EdgeEffect = new EdgeEffectParameters
|
||||||
@ -72,7 +74,7 @@ namespace osu.Game.Screens.Select
|
|||||||
RelativeSizeAxes = Axes.Y,
|
RelativeSizeAxes = Axes.Y,
|
||||||
|
|
||||||
// By limiting the width we avoid this box showing up as an outline around the drawables that are on top of it.
|
// By limiting the width we avoid this box showing up as an outline around the drawables that are on top of it.
|
||||||
Width = 40,
|
Width = colour_bar_width + corner_radius,
|
||||||
Child = new Box { RelativeSizeAxes = Axes.Both }
|
Child = new Box { RelativeSizeAxes = Axes.Both }
|
||||||
},
|
},
|
||||||
starCounter = new StarCounter
|
starCounter = new StarCounter
|
||||||
@ -82,7 +84,7 @@ namespace osu.Game.Screens.Select
|
|||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Scale = new Vector2(0.35f),
|
Scale = new Vector2(0.35f),
|
||||||
Shear = -wedged_container_shear,
|
Shear = -wedged_container_shear,
|
||||||
X = -15,
|
X = -colour_bar_width / 2,
|
||||||
Direction = FillDirection.Vertical
|
Direction = FillDirection.Vertical
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -163,7 +165,7 @@ namespace osu.Game.Screens.Select
|
|||||||
{
|
{
|
||||||
Masking = true,
|
Masking = true,
|
||||||
// We offset this by the portion of the colour bar underneath we wish to show
|
// We offset this by the portion of the colour bar underneath we wish to show
|
||||||
X = -30,
|
X = -colour_bar_width,
|
||||||
CornerRadius = corner_radius,
|
CornerRadius = corner_radius,
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Depth = DisplayedContent?.Depth + 1 ?? 0,
|
Depth = DisplayedContent?.Depth + 1 ?? 0,
|
||||||
@ -268,8 +270,7 @@ namespace osu.Game.Screens.Select
|
|||||||
{
|
{
|
||||||
Name = "Top-left aligned metadata",
|
Name = "Top-left aligned metadata",
|
||||||
Direction = FillDirection.Vertical,
|
Direction = FillDirection.Vertical,
|
||||||
Position = new Vector2(text_margin + shear_width, 12),
|
Padding = new MarginPadding { Horizontal = text_margin + shear_width, Top = 12 },
|
||||||
Width = .7f,
|
|
||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
|
Loading…
Reference in New Issue
Block a user