move constants, combine local vars into properties

This commit is contained in:
David Zhao
2019-07-26 13:07:28 +09:00
parent a9f0dda9d7
commit c89830f3d8
4 changed files with 25 additions and 25 deletions

View File

@ -42,9 +42,7 @@ namespace osu.Game.Screens.Select
public abstract class SongSelect : OsuScreen, IKeyBindingHandler<GlobalAction>
{
private static readonly Vector2 wedged_container_size = new Vector2(0.5f, 245);
public const float FILTER_CONTROL_HEIGHT = 100;
public const float FOOTER_HEIGHT = 50;
protected const float BACKGROUND_BLUR = 20;
private const float left_area_padding = 20;
@ -123,7 +121,7 @@ namespace osu.Game.Screens.Select
Size = new Vector2(wedged_container_size.X, 1),
Padding = new MarginPadding
{
Bottom = FOOTER_HEIGHT,
Bottom = Footer.HEIGHT,
Top = wedged_container_size.Y + left_area_padding,
Left = left_area_padding,
Right = left_area_padding * 2,
@ -154,8 +152,8 @@ namespace osu.Game.Screens.Select
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding
{
Top = FILTER_CONTROL_HEIGHT,
Bottom = FOOTER_HEIGHT
Top = FilterControl.HEIGHT,
Bottom = Footer.HEIGHT
},
Child = Carousel = new BeatmapCarousel
{
@ -171,7 +169,7 @@ namespace osu.Game.Screens.Select
FilterControl = new FilterControl
{
RelativeSizeAxes = Axes.X,
Height = FILTER_CONTROL_HEIGHT,
Height = FilterControl.HEIGHT,
FilterChanged = c => Carousel.Filter(c),
Background = { Width = 2 },
Exit = () =>
@ -210,7 +208,7 @@ namespace osu.Game.Screens.Select
Origin = Anchor.BottomLeft,
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Margin = new MarginPadding { Bottom = FOOTER_HEIGHT },
Margin = new MarginPadding { Bottom = Footer.HEIGHT },
Children = new Drawable[]
{
BeatmapOptions = new BeatmapOptionsOverlay(),
@ -222,13 +220,7 @@ namespace osu.Game.Screens.Select
}
}
},
Footer = new Footer
{
RelativeSizeAxes = Axes.X,
Height = FOOTER_HEIGHT,
Anchor = Anchor.BottomCentre,
Origin = Anchor.BottomCentre,
}
Footer = new Footer()
});
}