mirror of
https://github.com/osukey/osukey.git
synced 2025-08-06 16:13:57 +09:00
Refactor lounge sub screen layout for better loading screen appearance
This commit is contained in:
@ -76,6 +76,8 @@ namespace osu.Game.Screens.OnlinePlay.Lounge
|
|||||||
[BackgroundDependencyLoader(true)]
|
[BackgroundDependencyLoader(true)]
|
||||||
private void load([CanBeNull] IdleTracker idleTracker)
|
private void load([CanBeNull] IdleTracker idleTracker)
|
||||||
{
|
{
|
||||||
|
const float controls_area_height = 25f;
|
||||||
|
|
||||||
if (idleTracker != null)
|
if (idleTracker != null)
|
||||||
isIdle.BindTo(idleTracker.IsIdle);
|
isIdle.BindTo(idleTracker.IsIdle);
|
||||||
|
|
||||||
@ -84,28 +86,36 @@ namespace osu.Game.Screens.OnlinePlay.Lounge
|
|||||||
InternalChildren = new Drawable[]
|
InternalChildren = new Drawable[]
|
||||||
{
|
{
|
||||||
ListingPollingComponent = CreatePollingComponent().With(c => c.Filter.BindTarget = filter),
|
ListingPollingComponent = CreatePollingComponent().With(c => c.Filter.BindTarget = filter),
|
||||||
new Container
|
scrollContainer = new OsuScrollContainer
|
||||||
{
|
{
|
||||||
|
Name = @"Scrollable rooms container",
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Padding = new MarginPadding
|
Padding = new MarginPadding
|
||||||
{
|
{
|
||||||
Left = WaveOverlayContainer.WIDTH_PADDING,
|
Horizontal = WaveOverlayContainer.WIDTH_PADDING,
|
||||||
Right = WaveOverlayContainer.WIDTH_PADDING,
|
Top = Header.HEIGHT + controls_area_height + 20,
|
||||||
},
|
},
|
||||||
Child = new GridContainer
|
ScrollbarOverlapsContent = false,
|
||||||
|
Child = roomsContainer = new RoomsContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
Filter = { BindTarget = filter }
|
||||||
RowDimensions = new[]
|
}
|
||||||
{
|
|
||||||
new Dimension(GridSizeMode.Absolute, Header.HEIGHT),
|
|
||||||
new Dimension(GridSizeMode.Absolute, 25),
|
|
||||||
new Dimension(GridSizeMode.Absolute, 20)
|
|
||||||
},
|
},
|
||||||
Content = new[]
|
loadingLayer = new LoadingLayer(true),
|
||||||
|
new FillFlowContainer
|
||||||
{
|
{
|
||||||
new Drawable[]
|
Name = @"Header area flow",
|
||||||
|
RelativeSizeAxes = Axes.X,
|
||||||
|
AutoSizeAxes = Axes.Y,
|
||||||
|
Padding = new MarginPadding { Horizontal = WaveOverlayContainer.WIDTH_PADDING },
|
||||||
|
Direction = FillDirection.Vertical,
|
||||||
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
searchTextBox = new LoungeSearchTextBox
|
new Container
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.X,
|
||||||
|
Height = Header.HEIGHT,
|
||||||
|
Child = searchTextBox = new LoungeSearchTextBox
|
||||||
{
|
{
|
||||||
Anchor = Anchor.CentreRight,
|
Anchor = Anchor.CentreRight,
|
||||||
Origin = Anchor.CentreRight,
|
Origin = Anchor.CentreRight,
|
||||||
@ -113,12 +123,10 @@ namespace osu.Game.Screens.OnlinePlay.Lounge
|
|||||||
Width = 0.6f,
|
Width = 0.6f,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
new Drawable[]
|
|
||||||
{
|
|
||||||
new Container
|
new Container
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.X,
|
||||||
Depth = float.MinValue, // Contained filters should appear over the top of rooms.
|
Height = controls_area_height,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
Buttons.WithChild(CreateNewRoomButton().With(d =>
|
Buttons.WithChild(CreateNewRoomButton().With(d =>
|
||||||
@ -144,29 +152,6 @@ namespace osu.Game.Screens.OnlinePlay.Lounge
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
null,
|
|
||||||
new Drawable[]
|
|
||||||
{
|
|
||||||
new Container
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
scrollContainer = new OsuScrollContainer
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
ScrollbarOverlapsContent = false,
|
|
||||||
Child = roomsContainer = new RoomsContainer
|
|
||||||
{
|
|
||||||
Filter = { BindTarget = filter }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
loadingLayer = new LoadingLayer(true),
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user