1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 18:53:21 +08:00

Remove unnecessary container

This commit is contained in:
Dean Herbert 2021-05-17 18:55:18 +09:00
parent b80768b44a
commit ecf70c1707

View File

@ -82,32 +82,26 @@ namespace osu.Game.Screens.Play
Children = new Drawable[] Children = new Drawable[]
{ {
new SongProgressDisplay info = new SongProgressInfo
{ {
Children = new Drawable[] Origin = Anchor.BottomLeft,
{ Anchor = Anchor.BottomLeft,
info = new SongProgressInfo RelativeSizeAxes = Axes.X,
{ Height = info_height,
Origin = Anchor.BottomLeft, },
Anchor = Anchor.BottomLeft, graph = new SongProgressGraph
RelativeSizeAxes = Axes.X, {
Height = info_height, RelativeSizeAxes = Axes.X,
}, Origin = Anchor.BottomLeft,
graph = new SongProgressGraph Anchor = Anchor.BottomLeft,
{ Height = graph_height,
RelativeSizeAxes = Axes.X, Margin = new MarginPadding { Bottom = bottom_bar_height },
Origin = Anchor.BottomLeft, },
Anchor = Anchor.BottomLeft, bar = new SongProgressBar(bottom_bar_height, graph_height, handle_size)
Height = graph_height, {
Margin = new MarginPadding { Bottom = bottom_bar_height }, Anchor = Anchor.BottomLeft,
}, Origin = Anchor.BottomLeft,
bar = new SongProgressBar(bottom_bar_height, graph_height, handle_size) OnSeek = time => player?.Seek(time),
{
Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft,
OnSeek = time => player?.Seek(time),
},
}
}, },
}; };
} }
@ -188,19 +182,5 @@ namespace osu.Game.Screens.Play
float finalMargin = bottom_bar_height + (AllowSeeking.Value ? handle_size.Y : 0) + (ShowGraph.Value ? graph_height : 0); float finalMargin = bottom_bar_height + (AllowSeeking.Value ? handle_size.Y : 0) + (ShowGraph.Value ? graph_height : 0);
info.TransformTo(nameof(info.Margin), new MarginPadding { Bottom = finalMargin }, transition_duration, Easing.In); info.TransformTo(nameof(info.Margin), new MarginPadding { Bottom = finalMargin }, transition_duration, Easing.In);
} }
public class SongProgressDisplay : Container
{
public SongProgressDisplay()
{
// TODO: move actual implementation into this.
// exists for skin customisation purposes (interface should be added to this container).
Masking = true;
RelativeSizeAxes = Axes.Both;
Anchor = Anchor.BottomCentre;
Origin = Anchor.BottomCentre;
}
}
} }
} }