mirror of
https://github.com/ppy/osu.git
synced 2024-12-16 22:22:54 +08:00
Expose BeatmapCardNormal
height const
This commit is contained in:
parent
e01e630fd7
commit
fda17a5a72
@ -23,7 +23,7 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
|||||||
protected override Drawable IdleContent => idleBottomContent;
|
protected override Drawable IdleContent => idleBottomContent;
|
||||||
protected override Drawable DownloadInProgressContent => downloadProgressBar;
|
protected override Drawable DownloadInProgressContent => downloadProgressBar;
|
||||||
|
|
||||||
private const float height = 100;
|
public const float HEIGHT = 100;
|
||||||
|
|
||||||
[Cached]
|
[Cached]
|
||||||
private readonly BeatmapCardContent content;
|
private readonly BeatmapCardContent content;
|
||||||
@ -42,14 +42,14 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
|||||||
public BeatmapCardNormal(APIBeatmapSet beatmapSet, bool allowExpansion = true)
|
public BeatmapCardNormal(APIBeatmapSet beatmapSet, bool allowExpansion = true)
|
||||||
: base(beatmapSet, allowExpansion)
|
: base(beatmapSet, allowExpansion)
|
||||||
{
|
{
|
||||||
content = new BeatmapCardContent(height);
|
content = new BeatmapCardContent(HEIGHT);
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
Width = WIDTH;
|
Width = WIDTH;
|
||||||
Height = height;
|
Height = HEIGHT;
|
||||||
|
|
||||||
FillFlowContainer leftIconArea = null!;
|
FillFlowContainer leftIconArea = null!;
|
||||||
FillFlowContainer titleBadgeArea = null!;
|
FillFlowContainer titleBadgeArea = null!;
|
||||||
@ -65,7 +65,7 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
|||||||
thumbnail = new BeatmapCardThumbnail(BeatmapSet, BeatmapSet)
|
thumbnail = new BeatmapCardThumbnail(BeatmapSet, BeatmapSet)
|
||||||
{
|
{
|
||||||
Name = @"Left (icon) area",
|
Name = @"Left (icon) area",
|
||||||
Size = new Vector2(height),
|
Size = new Vector2(HEIGHT),
|
||||||
Padding = new MarginPadding { Right = CORNER_RADIUS },
|
Padding = new MarginPadding { Right = CORNER_RADIUS },
|
||||||
Child = leftIconArea = new FillFlowContainer
|
Child = leftIconArea = new FillFlowContainer
|
||||||
{
|
{
|
||||||
@ -77,8 +77,8 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
|||||||
},
|
},
|
||||||
buttonContainer = new CollapsibleButtonContainer(BeatmapSet)
|
buttonContainer = new CollapsibleButtonContainer(BeatmapSet)
|
||||||
{
|
{
|
||||||
X = height - CORNER_RADIUS,
|
X = HEIGHT - CORNER_RADIUS,
|
||||||
Width = WIDTH - height + CORNER_RADIUS,
|
Width = WIDTH - HEIGHT + CORNER_RADIUS,
|
||||||
FavouriteState = { BindTarget = FavouriteState },
|
FavouriteState = { BindTarget = FavouriteState },
|
||||||
ButtonsCollapsedWidth = CORNER_RADIUS,
|
ButtonsCollapsedWidth = CORNER_RADIUS,
|
||||||
ButtonsExpandedWidth = 30,
|
ButtonsExpandedWidth = 30,
|
||||||
|
Loading…
Reference in New Issue
Block a user