mirror of
https://github.com/osukey/osukey.git
synced 2025-05-18 03:57:32 +09:00
Refactor SpotlightSelector layout
This commit is contained in:
parent
c49ce65326
commit
c2c80d2a98
@ -50,10 +50,11 @@ namespace osu.Game.Overlays.Rankings
|
|||||||
public SpotlightSelector()
|
public SpotlightSelector()
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
Height = 100;
|
AutoSizeAxes = Axes.Y;
|
||||||
Add(content = new Container
|
Add(content = new Container
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.X,
|
||||||
|
AutoSizeAxes = Axes.Y,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
background = new Box
|
background = new Box
|
||||||
@ -62,25 +63,34 @@ namespace osu.Game.Overlays.Rankings
|
|||||||
},
|
},
|
||||||
new Container
|
new Container
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.X,
|
||||||
Padding = new MarginPadding { Horizontal = UserProfileOverlay.CONTENT_X_MARGIN, Vertical = 10 },
|
AutoSizeAxes = Axes.Y,
|
||||||
|
Padding = new MarginPadding { Horizontal = UserProfileOverlay.CONTENT_X_MARGIN },
|
||||||
|
Child = new FillFlowContainer
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.X,
|
||||||
|
AutoSizeAxes = Axes.Y,
|
||||||
|
Direction = FillDirection.Vertical,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
dropdown = new SpotlightsDropdown
|
new Container
|
||||||
{
|
{
|
||||||
Anchor = Anchor.TopCentre,
|
Margin = new MarginPadding { Vertical = 20 },
|
||||||
Origin = Anchor.TopCentre,
|
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Current = Current,
|
Height = 40,
|
||||||
Depth = -float.MaxValue
|
Depth = -float.MaxValue,
|
||||||
|
Child = dropdown = new SpotlightsDropdown
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.X,
|
||||||
|
Current = Current
|
||||||
|
}
|
||||||
},
|
},
|
||||||
new FillFlowContainer
|
new FillFlowContainer
|
||||||
{
|
{
|
||||||
Anchor = Anchor.BottomRight,
|
|
||||||
Origin = Anchor.BottomRight,
|
|
||||||
AutoSizeAxes = Axes.Both,
|
AutoSizeAxes = Axes.Both,
|
||||||
Direction = FillDirection.Horizontal,
|
Direction = FillDirection.Horizontal,
|
||||||
Spacing = new Vector2(15, 0),
|
Spacing = new Vector2(10, 0),
|
||||||
|
Margin = new MarginPadding { Vertical = 5 },
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
startDateColumn = new InfoColumn(@"Start Date"),
|
startDateColumn = new InfoColumn(@"Start Date"),
|
||||||
@ -88,6 +98,18 @@ namespace osu.Game.Overlays.Rankings
|
|||||||
mapCountColumn = new InfoColumn(@"Map Count"),
|
mapCountColumn = new InfoColumn(@"Map Count"),
|
||||||
participantsColumn = new InfoColumn(@"Participants")
|
participantsColumn = new InfoColumn(@"Participants")
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
new Container
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.X,
|
||||||
|
AutoSizeAxes = Axes.Y,
|
||||||
|
Padding = new MarginPadding { Vertical = 20 },
|
||||||
|
Child = new RankingsSortTabControl
|
||||||
|
{
|
||||||
|
Anchor = Anchor.CentreRight,
|
||||||
|
Origin = Anchor.CentreRight
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -128,12 +150,13 @@ namespace osu.Game.Overlays.Rankings
|
|||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.Both;
|
AutoSizeAxes = Axes.Both;
|
||||||
Direction = FillDirection.Vertical;
|
Direction = FillDirection.Vertical;
|
||||||
|
Margin = new MarginPadding { Vertical = 10 };
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new OsuSpriteText
|
new OsuSpriteText
|
||||||
{
|
{
|
||||||
Text = name,
|
Text = name,
|
||||||
Font = OsuFont.GetFont(size: 10),
|
Font = OsuFont.GetFont(size: 10, weight: FontWeight.Regular),
|
||||||
},
|
},
|
||||||
new Container
|
new Container
|
||||||
{
|
{
|
||||||
@ -143,7 +166,7 @@ namespace osu.Game.Overlays.Rankings
|
|||||||
{
|
{
|
||||||
Anchor = Anchor.BottomLeft,
|
Anchor = Anchor.BottomLeft,
|
||||||
Origin = Anchor.BottomLeft,
|
Origin = Anchor.BottomLeft,
|
||||||
Font = OsuFont.GetFont(size: 18, weight: FontWeight.Light),
|
Font = OsuFont.GetFont(size: 20, weight: FontWeight.Light),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user