mirror of
https://github.com/ppy/osu.git
synced 2025-01-27 19:23:21 +08:00
Merge pull request #27278 from EVAST9919/grid-update
Apply padding to `GridContainer`s directly where possible
This commit is contained in:
commit
9c40ff2911
@ -66,41 +66,37 @@ namespace osu.Game.Overlays.Chat.ChannelList
|
|||||||
Colour = colourProvider.Background4,
|
Colour = colourProvider.Background4,
|
||||||
Alpha = 0f,
|
Alpha = 0f,
|
||||||
},
|
},
|
||||||
new Container
|
new GridContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Padding = new MarginPadding { Left = 18, Right = 10 },
|
Padding = new MarginPadding { Left = 18, Right = 10 },
|
||||||
Child = new GridContainer
|
ColumnDimensions = new[]
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
new Dimension(GridSizeMode.AutoSize),
|
||||||
ColumnDimensions = new[]
|
new Dimension(),
|
||||||
{
|
new Dimension(GridSizeMode.AutoSize),
|
||||||
new Dimension(GridSizeMode.AutoSize),
|
new Dimension(GridSizeMode.AutoSize),
|
||||||
new Dimension(),
|
|
||||||
new Dimension(GridSizeMode.AutoSize),
|
|
||||||
new Dimension(GridSizeMode.AutoSize),
|
|
||||||
},
|
|
||||||
Content = new[]
|
|
||||||
{
|
|
||||||
new Drawable?[]
|
|
||||||
{
|
|
||||||
createIcon(),
|
|
||||||
text = new TruncatingSpriteText
|
|
||||||
{
|
|
||||||
Anchor = Anchor.CentreLeft,
|
|
||||||
Origin = Anchor.CentreLeft,
|
|
||||||
Text = Channel.Name,
|
|
||||||
Font = OsuFont.Torus.With(size: 17, weight: FontWeight.SemiBold),
|
|
||||||
Colour = colourProvider.Light3,
|
|
||||||
Margin = new MarginPadding { Bottom = 2 },
|
|
||||||
RelativeSizeAxes = Axes.X,
|
|
||||||
},
|
|
||||||
createMentionPill(),
|
|
||||||
close = createCloseButton(),
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
Content = new[]
|
||||||
|
{
|
||||||
|
new Drawable?[]
|
||||||
|
{
|
||||||
|
createIcon(),
|
||||||
|
text = new TruncatingSpriteText
|
||||||
|
{
|
||||||
|
Anchor = Anchor.CentreLeft,
|
||||||
|
Origin = Anchor.CentreLeft,
|
||||||
|
Text = Channel.Name,
|
||||||
|
Font = OsuFont.Torus.With(size: 17, weight: FontWeight.SemiBold),
|
||||||
|
Colour = colourProvider.Light3,
|
||||||
|
Margin = new MarginPadding { Bottom = 2 },
|
||||||
|
RelativeSizeAxes = Axes.X,
|
||||||
|
},
|
||||||
|
createMentionPill(),
|
||||||
|
close = createCloseButton(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Action = () => OnRequestSelect?.Invoke(Channel);
|
Action = () => OnRequestSelect?.Invoke(Channel);
|
||||||
|
@ -26,47 +26,42 @@ namespace osu.Game.Overlays.Profile.Header
|
|||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Colour = colourProvider.Background5,
|
Colour = colourProvider.Background5,
|
||||||
},
|
},
|
||||||
new Container
|
new GridContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
Padding = new MarginPadding { Horizontal = WaveOverlayContainer.HORIZONTAL_PADDING, Vertical = 10 },
|
Padding = new MarginPadding { Horizontal = WaveOverlayContainer.HORIZONTAL_PADDING, Vertical = 10 },
|
||||||
Child = new GridContainer
|
RowDimensions = new[]
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
new Dimension(GridSizeMode.AutoSize),
|
||||||
AutoSizeAxes = Axes.Y,
|
},
|
||||||
RowDimensions = new[]
|
ColumnDimensions = new[]
|
||||||
|
{
|
||||||
|
new Dimension(),
|
||||||
|
new Dimension(GridSizeMode.AutoSize),
|
||||||
|
new Dimension(GridSizeMode.AutoSize),
|
||||||
|
},
|
||||||
|
Content = new[]
|
||||||
|
{
|
||||||
|
new Drawable[]
|
||||||
{
|
{
|
||||||
new Dimension(GridSizeMode.AutoSize),
|
new MainDetails
|
||||||
},
|
|
||||||
ColumnDimensions = new[]
|
|
||||||
{
|
|
||||||
new Dimension(),
|
|
||||||
new Dimension(GridSizeMode.AutoSize),
|
|
||||||
new Dimension(GridSizeMode.AutoSize),
|
|
||||||
},
|
|
||||||
Content = new[]
|
|
||||||
{
|
|
||||||
new Drawable[]
|
|
||||||
{
|
{
|
||||||
new MainDetails
|
RelativeSizeAxes = Axes.X,
|
||||||
{
|
User = { BindTarget = User }
|
||||||
RelativeSizeAxes = Axes.X,
|
},
|
||||||
User = { BindTarget = User }
|
new Box
|
||||||
},
|
{
|
||||||
new Box
|
RelativeSizeAxes = Axes.Y,
|
||||||
{
|
Width = 2,
|
||||||
RelativeSizeAxes = Axes.Y,
|
Colour = colourProvider.Background6,
|
||||||
Width = 2,
|
Margin = new MarginPadding { Horizontal = 15 }
|
||||||
Colour = colourProvider.Background6,
|
},
|
||||||
Margin = new MarginPadding { Horizontal = 15 }
|
new ExtendedDetails
|
||||||
},
|
{
|
||||||
new ExtendedDetails
|
Anchor = Anchor.CentreLeft,
|
||||||
{
|
Origin = Anchor.CentreLeft,
|
||||||
Anchor = Anchor.CentreLeft,
|
User = { BindTarget = User }
|
||||||
Origin = Anchor.CentreLeft,
|
|
||||||
User = { BindTarget = User }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -47,35 +47,31 @@ namespace osu.Game.Screens.Edit
|
|||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Colour = colourProvider.Background4,
|
Colour = colourProvider.Background4,
|
||||||
},
|
},
|
||||||
new Container
|
new GridContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Child = new GridContainer
|
ColumnDimensions = new[]
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
new Dimension(GridSizeMode.Absolute, 170),
|
||||||
ColumnDimensions = new[]
|
new Dimension(),
|
||||||
{
|
new Dimension(GridSizeMode.Absolute, 220),
|
||||||
new Dimension(GridSizeMode.Absolute, 170),
|
new Dimension(GridSizeMode.Absolute, HitObjectComposer.TOOLBOX_CONTRACTED_SIZE_RIGHT),
|
||||||
new Dimension(),
|
|
||||||
new Dimension(GridSizeMode.Absolute, 220),
|
|
||||||
new Dimension(GridSizeMode.Absolute, HitObjectComposer.TOOLBOX_CONTRACTED_SIZE_RIGHT),
|
|
||||||
},
|
|
||||||
Content = new[]
|
|
||||||
{
|
|
||||||
new Drawable[]
|
|
||||||
{
|
|
||||||
new TimeInfoContainer { RelativeSizeAxes = Axes.Both },
|
|
||||||
new SummaryTimeline { RelativeSizeAxes = Axes.Both },
|
|
||||||
new PlaybackControl { RelativeSizeAxes = Axes.Both },
|
|
||||||
TestGameplayButton = new TestGameplayButton
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
Size = new Vector2(1),
|
|
||||||
Action = editor.TestGameplay,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
Content = new[]
|
||||||
|
{
|
||||||
|
new Drawable[]
|
||||||
|
{
|
||||||
|
new TimeInfoContainer { RelativeSizeAxes = Axes.Both },
|
||||||
|
new SummaryTimeline { RelativeSizeAxes = Axes.Both },
|
||||||
|
new PlaybackControl { RelativeSizeAxes = Axes.Both },
|
||||||
|
TestGameplayButton = new TestGameplayButton
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Size = new Vector2(1),
|
||||||
|
Action = editor.TestGameplay,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -86,35 +86,31 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Colour = colourProvider.Background3
|
Colour = colourProvider.Background3
|
||||||
},
|
},
|
||||||
new Container
|
new GridContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Child = new GridContainer
|
Content = new[]
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
new Drawable[]
|
||||||
Content = new[]
|
|
||||||
{
|
{
|
||||||
new Drawable[]
|
new ChevronButton
|
||||||
{
|
{
|
||||||
new ChevronButton
|
Icon = FontAwesome.Solid.ChevronLeft,
|
||||||
{
|
Action = beatDivisor.SelectPrevious
|
||||||
Icon = FontAwesome.Solid.ChevronLeft,
|
|
||||||
Action = beatDivisor.SelectPrevious
|
|
||||||
},
|
|
||||||
new DivisorDisplay { BeatDivisor = { BindTarget = beatDivisor } },
|
|
||||||
new ChevronButton
|
|
||||||
{
|
|
||||||
Icon = FontAwesome.Solid.ChevronRight,
|
|
||||||
Action = beatDivisor.SelectNext
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
new DivisorDisplay { BeatDivisor = { BindTarget = beatDivisor } },
|
||||||
|
new ChevronButton
|
||||||
|
{
|
||||||
|
Icon = FontAwesome.Solid.ChevronRight,
|
||||||
|
Action = beatDivisor.SelectNext
|
||||||
|
}
|
||||||
},
|
},
|
||||||
ColumnDimensions = new[]
|
},
|
||||||
{
|
ColumnDimensions = new[]
|
||||||
new Dimension(GridSizeMode.Absolute, 20),
|
{
|
||||||
new Dimension(),
|
new Dimension(GridSizeMode.Absolute, 20),
|
||||||
new Dimension(GridSizeMode.Absolute, 20)
|
new Dimension(),
|
||||||
}
|
new Dimension(GridSizeMode.Absolute, 20)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -122,42 +118,31 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
},
|
},
|
||||||
new Drawable[]
|
new Drawable[]
|
||||||
{
|
{
|
||||||
new Container
|
new GridContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Children = new Drawable[]
|
Content = new[]
|
||||||
{
|
{
|
||||||
new Container
|
new Drawable[]
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
new ChevronButton
|
||||||
Child = new GridContainer
|
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
Icon = FontAwesome.Solid.ChevronLeft,
|
||||||
Content = new[]
|
Action = () => cycleDivisorType(-1)
|
||||||
{
|
},
|
||||||
new Drawable[]
|
new DivisorTypeText { BeatDivisor = { BindTarget = beatDivisor } },
|
||||||
{
|
new ChevronButton
|
||||||
new ChevronButton
|
{
|
||||||
{
|
Icon = FontAwesome.Solid.ChevronRight,
|
||||||
Icon = FontAwesome.Solid.ChevronLeft,
|
Action = () => cycleDivisorType(1)
|
||||||
Action = () => cycleDivisorType(-1)
|
|
||||||
},
|
|
||||||
new DivisorTypeText { BeatDivisor = { BindTarget = beatDivisor } },
|
|
||||||
new ChevronButton
|
|
||||||
{
|
|
||||||
Icon = FontAwesome.Solid.ChevronRight,
|
|
||||||
Action = () => cycleDivisorType(1)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
ColumnDimensions = new[]
|
|
||||||
{
|
|
||||||
new Dimension(GridSizeMode.Absolute, 20),
|
|
||||||
new Dimension(),
|
|
||||||
new Dimension(GridSizeMode.Absolute, 20)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
},
|
||||||
|
ColumnDimensions = new[]
|
||||||
|
{
|
||||||
|
new Dimension(GridSizeMode.Absolute, 20),
|
||||||
|
new Dimension(),
|
||||||
|
new Dimension(GridSizeMode.Absolute, 20)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -57,37 +57,32 @@ namespace osu.Game.Screens.Edit
|
|||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Colour = colourProvider.Background4
|
Colour = colourProvider.Background4
|
||||||
},
|
},
|
||||||
new Container
|
new GridContainer
|
||||||
{
|
{
|
||||||
Name = "Timeline content",
|
Name = "Timeline content",
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
Padding = new MarginPadding { Horizontal = PADDING, Top = PADDING },
|
Padding = new MarginPadding { Horizontal = PADDING, Top = PADDING },
|
||||||
Child = new GridContainer
|
Content = new[]
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
new Drawable[]
|
||||||
AutoSizeAxes = Axes.Y,
|
|
||||||
Content = new[]
|
|
||||||
{
|
{
|
||||||
new Drawable[]
|
TimelineContent = new Container
|
||||||
{
|
{
|
||||||
TimelineContent = new Container
|
RelativeSizeAxes = Axes.X,
|
||||||
{
|
AutoSizeAxes = Axes.Y,
|
||||||
RelativeSizeAxes = Axes.X,
|
|
||||||
AutoSizeAxes = Axes.Y,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
RowDimensions = new[]
|
|
||||||
{
|
|
||||||
new Dimension(GridSizeMode.AutoSize),
|
|
||||||
},
|
|
||||||
ColumnDimensions = new[]
|
|
||||||
{
|
|
||||||
new Dimension(),
|
|
||||||
new Dimension(GridSizeMode.Absolute, 90),
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
RowDimensions = new[]
|
||||||
|
{
|
||||||
|
new Dimension(GridSizeMode.AutoSize),
|
||||||
|
},
|
||||||
|
ColumnDimensions = new[]
|
||||||
|
{
|
||||||
|
new Dimension(),
|
||||||
|
new Dimension(GridSizeMode.Absolute, 90),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -65,35 +65,28 @@ namespace osu.Game.Screens.Edit.Timing
|
|||||||
{
|
{
|
||||||
new Drawable[]
|
new Drawable[]
|
||||||
{
|
{
|
||||||
new Container
|
new GridContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Padding = new MarginPadding(padding),
|
Padding = new MarginPadding(padding),
|
||||||
Children = new Drawable[]
|
ColumnDimensions = new[]
|
||||||
{
|
{
|
||||||
new GridContainer
|
new Dimension(GridSizeMode.AutoSize),
|
||||||
|
new Dimension()
|
||||||
|
},
|
||||||
|
Content = new[]
|
||||||
|
{
|
||||||
|
new Drawable[]
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
metronome = new MetronomeDisplay
|
||||||
ColumnDimensions = new[]
|
|
||||||
{
|
{
|
||||||
new Dimension(GridSizeMode.AutoSize),
|
Anchor = Anchor.CentreLeft,
|
||||||
new Dimension()
|
Origin = Anchor.CentreLeft,
|
||||||
},
|
|
||||||
Content = new[]
|
|
||||||
{
|
|
||||||
new Drawable[]
|
|
||||||
{
|
|
||||||
metronome = new MetronomeDisplay
|
|
||||||
{
|
|
||||||
Anchor = Anchor.CentreLeft,
|
|
||||||
Origin = Anchor.CentreLeft,
|
|
||||||
},
|
|
||||||
new WaveformComparisonDisplay()
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
new WaveformComparisonDisplay()
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
new Drawable[]
|
new Drawable[]
|
||||||
{
|
{
|
||||||
|
@ -34,25 +34,21 @@ namespace osu.Game.Screens.Edit.Verify
|
|||||||
InterpretedDifficulty.Default = StarDifficulty.GetDifficultyRating(EditorBeatmap.BeatmapInfo.StarRating);
|
InterpretedDifficulty.Default = StarDifficulty.GetDifficultyRating(EditorBeatmap.BeatmapInfo.StarRating);
|
||||||
InterpretedDifficulty.SetDefault();
|
InterpretedDifficulty.SetDefault();
|
||||||
|
|
||||||
Child = new Container
|
Child = new GridContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Child = new GridContainer
|
ColumnDimensions = new[]
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
new Dimension(),
|
||||||
ColumnDimensions = new[]
|
new Dimension(GridSizeMode.Absolute, 250),
|
||||||
|
},
|
||||||
|
Content = new[]
|
||||||
|
{
|
||||||
|
new Drawable[]
|
||||||
{
|
{
|
||||||
new Dimension(),
|
IssueList = new IssueList(),
|
||||||
new Dimension(GridSizeMode.Absolute, 250),
|
new IssueSettings(),
|
||||||
},
|
},
|
||||||
Content = new[]
|
|
||||||
{
|
|
||||||
new Drawable[]
|
|
||||||
{
|
|
||||||
IssueList = new IssueList(),
|
|
||||||
new IssueSettings(),
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -26,48 +26,44 @@ namespace osu.Game.Screens.OnlinePlay.Components
|
|||||||
[Resolved(typeof(Room))]
|
[Resolved(typeof(Room))]
|
||||||
protected BindableList<PlaylistItem> Playlist { get; private set; }
|
protected BindableList<PlaylistItem> Playlist { get; private set; }
|
||||||
|
|
||||||
private readonly Drawable playlistArea;
|
private readonly GridContainer playlistArea;
|
||||||
private readonly DrawableRoomPlaylist playlist;
|
private readonly DrawableRoomPlaylist playlist;
|
||||||
|
|
||||||
public MatchBeatmapDetailArea()
|
public MatchBeatmapDetailArea()
|
||||||
{
|
{
|
||||||
Add(playlistArea = new Container
|
Add(playlistArea = new GridContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Padding = new MarginPadding { Vertical = 10 },
|
Padding = new MarginPadding { Vertical = 10 },
|
||||||
Child = new GridContainer
|
Content = new[]
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
new Drawable[]
|
||||||
Content = new[]
|
|
||||||
{
|
{
|
||||||
new Drawable[]
|
new Container
|
||||||
{
|
{
|
||||||
new Container
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Padding = new MarginPadding { Bottom = 10 },
|
||||||
|
Child = playlist = new PlaylistsRoomSettingsPlaylist
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both
|
||||||
Padding = new MarginPadding { Bottom = 10 },
|
|
||||||
Child = playlist = new PlaylistsRoomSettingsPlaylist
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
new Drawable[]
|
|
||||||
{
|
|
||||||
new RoundedButton
|
|
||||||
{
|
|
||||||
Text = "Add new playlist entry",
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
Size = Vector2.One,
|
|
||||||
Action = () => CreateNewItem?.Invoke()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
RowDimensions = new[]
|
new Drawable[]
|
||||||
{
|
{
|
||||||
new Dimension(),
|
new RoundedButton
|
||||||
new Dimension(GridSizeMode.Absolute, 50),
|
{
|
||||||
}
|
Text = "Add new playlist entry",
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Size = Vector2.One,
|
||||||
|
Action = () => CreateNewItem?.Invoke()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
RowDimensions = new[]
|
||||||
|
{
|
||||||
|
new Dimension(),
|
||||||
|
new Dimension(GridSizeMode.Absolute, 50),
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -40,35 +40,31 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
|
|||||||
Colour = Color4.Black,
|
Colour = Color4.Black,
|
||||||
Alpha = 0.5f
|
Alpha = 0.5f
|
||||||
},
|
},
|
||||||
new Container
|
new GridContainer
|
||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
AutoSizeAxes = Axes.Both,
|
AutoSizeAxes = Axes.Both,
|
||||||
Padding = new MarginPadding { Horizontal = padding },
|
Padding = new MarginPadding { Horizontal = padding },
|
||||||
Child = new GridContainer
|
ColumnDimensions = new[]
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.Both,
|
new Dimension(GridSizeMode.AutoSize, minSize: 80 - 2 * padding)
|
||||||
ColumnDimensions = new[]
|
},
|
||||||
|
Content = new[]
|
||||||
|
{
|
||||||
|
new[]
|
||||||
{
|
{
|
||||||
new Dimension(GridSizeMode.AutoSize, minSize: 80 - 2 * padding)
|
new Container
|
||||||
},
|
|
||||||
Content = new[]
|
|
||||||
{
|
|
||||||
new[]
|
|
||||||
{
|
{
|
||||||
new Container
|
AutoSizeAxes = Axes.Both,
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
Padding = new MarginPadding { Bottom = 2 },
|
||||||
|
Child = content = new Container
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.Both,
|
AutoSizeAxes = Axes.Both,
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Padding = new MarginPadding { Bottom = 2 },
|
|
||||||
Child = content = new Container
|
|
||||||
{
|
|
||||||
AutoSizeAxes = Axes.Both,
|
|
||||||
Anchor = Anchor.Centre,
|
|
||||||
Origin = Anchor.Centre,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -95,38 +95,34 @@ namespace osu.Game.Screens.OnlinePlay.Playlists
|
|||||||
new Drawable[]
|
new Drawable[]
|
||||||
{
|
{
|
||||||
// Playlist items column
|
// Playlist items column
|
||||||
new Container
|
new GridContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Padding = new MarginPadding { Right = 5 },
|
Padding = new MarginPadding { Right = 5 },
|
||||||
Child = new GridContainer
|
Content = new[]
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
new Drawable[] { new OverlinedPlaylistHeader(), },
|
||||||
Content = new[]
|
new Drawable[]
|
||||||
{
|
{
|
||||||
new Drawable[] { new OverlinedPlaylistHeader(), },
|
new DrawableRoomPlaylist
|
||||||
new Drawable[]
|
|
||||||
{
|
{
|
||||||
new DrawableRoomPlaylist
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Items = { BindTarget = Room.Playlist },
|
||||||
|
SelectedItem = { BindTarget = SelectedItem },
|
||||||
|
AllowSelection = true,
|
||||||
|
AllowShowingResults = true,
|
||||||
|
RequestResults = item =>
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
Debug.Assert(RoomId.Value != null);
|
||||||
Items = { BindTarget = Room.Playlist },
|
ParentScreen?.Push(new PlaylistsResultsScreen(null, RoomId.Value.Value, item, false));
|
||||||
SelectedItem = { BindTarget = SelectedItem },
|
|
||||||
AllowSelection = true,
|
|
||||||
AllowShowingResults = true,
|
|
||||||
RequestResults = item =>
|
|
||||||
{
|
|
||||||
Debug.Assert(RoomId.Value != null);
|
|
||||||
ParentScreen?.Push(new PlaylistsResultsScreen(null, RoomId.Value.Value, item, false));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
RowDimensions = new[]
|
},
|
||||||
{
|
RowDimensions = new[]
|
||||||
new Dimension(GridSizeMode.AutoSize),
|
{
|
||||||
new Dimension(),
|
new Dimension(GridSizeMode.AutoSize),
|
||||||
}
|
new Dimension(),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// Spacer
|
// Spacer
|
||||||
|
@ -150,44 +150,40 @@ namespace osu.Game.Screens.Ranking.Contracted
|
|||||||
},
|
},
|
||||||
new Drawable[]
|
new Drawable[]
|
||||||
{
|
{
|
||||||
new Container
|
new GridContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Padding = new MarginPadding { Vertical = 5 },
|
Padding = new MarginPadding { Vertical = 5 },
|
||||||
Child = new GridContainer
|
Content = new[]
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
new Drawable[]
|
||||||
Content = new[]
|
|
||||||
{
|
{
|
||||||
new Drawable[]
|
new OsuSpriteText
|
||||||
{
|
{
|
||||||
new OsuSpriteText
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
Current = scoreManager.GetBindableTotalScoreString(score),
|
||||||
|
Font = OsuFont.GetFont(size: 20, weight: FontWeight.Medium, fixedWidth: true),
|
||||||
|
Spacing = new Vector2(-1, 0)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
new Drawable[]
|
||||||
|
{
|
||||||
|
new Container
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Padding = new MarginPadding { Top = 2 },
|
||||||
|
Child = new DrawableRank(score.Rank)
|
||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Current = scoreManager.GetBindableTotalScoreString(score),
|
|
||||||
Font = OsuFont.GetFont(size: 20, weight: FontWeight.Medium, fixedWidth: true),
|
|
||||||
Spacing = new Vector2(-1, 0)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
new Drawable[]
|
|
||||||
{
|
|
||||||
new Container
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
Padding = new MarginPadding { Top = 2 },
|
|
||||||
Child = new DrawableRank(score.Rank)
|
|
||||||
{
|
|
||||||
Anchor = Anchor.Centre,
|
|
||||||
Origin = Anchor.Centre,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
RowDimensions = new[]
|
},
|
||||||
{
|
RowDimensions = new[]
|
||||||
new Dimension(GridSizeMode.AutoSize),
|
{
|
||||||
}
|
new Dimension(GridSizeMode.AutoSize),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -75,99 +75,92 @@ namespace osu.Game.Screens.Select
|
|||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Colour = Colour4.Black.Opacity(0.3f),
|
Colour = Colour4.Black.Opacity(0.3f),
|
||||||
},
|
},
|
||||||
new Container
|
new GridContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Padding = new MarginPadding { Horizontal = spacing },
|
Padding = new MarginPadding { Horizontal = spacing },
|
||||||
Children = new Drawable[]
|
RowDimensions = new[]
|
||||||
{
|
{
|
||||||
new GridContainer
|
new Dimension(GridSizeMode.AutoSize),
|
||||||
|
new Dimension()
|
||||||
|
},
|
||||||
|
Content = new[]
|
||||||
|
{
|
||||||
|
new Drawable[]
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
new FillFlowContainer
|
||||||
RowDimensions = new[]
|
|
||||||
{
|
{
|
||||||
new Dimension(GridSizeMode.AutoSize),
|
RelativeSizeAxes = Axes.X,
|
||||||
new Dimension()
|
AutoSizeAxes = Axes.Y,
|
||||||
},
|
Direction = FillDirection.Horizontal,
|
||||||
Content = new[]
|
Children = new Drawable[]
|
||||||
{
|
|
||||||
new Drawable[]
|
|
||||||
{
|
{
|
||||||
new FillFlowContainer
|
new FillFlowContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
Direction = FillDirection.Horizontal,
|
Width = 0.5f,
|
||||||
Children = new Drawable[]
|
Spacing = new Vector2(spacing),
|
||||||
|
Padding = new MarginPadding { Right = spacing / 2 },
|
||||||
|
Children = new[]
|
||||||
{
|
{
|
||||||
new FillFlowContainer
|
new DetailBox().WithChild(new OnlineViewContainer(string.Empty)
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
AutoSizeAxes = Axes.Y,
|
Height = 134,
|
||||||
Width = 0.5f,
|
Padding = new MarginPadding { Horizontal = spacing, Top = spacing },
|
||||||
Spacing = new Vector2(spacing),
|
Child = ratingsDisplay = new UserRatings
|
||||||
Padding = new MarginPadding { Right = spacing / 2 },
|
|
||||||
Children = new[]
|
|
||||||
{
|
{
|
||||||
new DetailBox().WithChild(new OnlineViewContainer(string.Empty)
|
RelativeSizeAxes = Axes.Both,
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.X,
|
|
||||||
Height = 134,
|
|
||||||
Padding = new MarginPadding { Horizontal = spacing, Top = spacing },
|
|
||||||
Child = ratingsDisplay = new UserRatings
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
},
|
},
|
||||||
},
|
}),
|
||||||
new OsuScrollContainer
|
},
|
||||||
|
},
|
||||||
|
new OsuScrollContainer
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.X,
|
||||||
|
Height = 250,
|
||||||
|
Width = 0.5f,
|
||||||
|
ScrollbarVisible = false,
|
||||||
|
Padding = new MarginPadding { Left = spacing / 2 },
|
||||||
|
Child = new FillFlowContainer
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.X,
|
||||||
|
AutoSizeAxes = Axes.Y,
|
||||||
|
LayoutDuration = transition_duration,
|
||||||
|
LayoutEasing = Easing.OutQuad,
|
||||||
|
Children = new[]
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
description = new MetadataSectionDescription(query => songSelect?.Search(query)),
|
||||||
Height = 250,
|
source = new MetadataSectionSource(query => songSelect?.Search(query)),
|
||||||
Width = 0.5f,
|
tags = new MetadataSectionTags(query => songSelect?.Search(query)),
|
||||||
ScrollbarVisible = false,
|
|
||||||
Padding = new MarginPadding { Left = spacing / 2 },
|
|
||||||
Child = new FillFlowContainer
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.X,
|
|
||||||
AutoSizeAxes = Axes.Y,
|
|
||||||
LayoutDuration = transition_duration,
|
|
||||||
LayoutEasing = Easing.OutQuad,
|
|
||||||
Children = new[]
|
|
||||||
{
|
|
||||||
description = new MetadataSectionDescription(query => songSelect?.Search(query)),
|
|
||||||
source = new MetadataSectionSource(query => songSelect?.Search(query)),
|
|
||||||
tags = new MetadataSectionTags(query => songSelect?.Search(query)),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
new Drawable[]
|
},
|
||||||
|
},
|
||||||
|
new Drawable[]
|
||||||
|
{
|
||||||
|
failRetryContainer = new OnlineViewContainer("Sign in to view more details")
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
failRetryContainer = new OnlineViewContainer("Sign in to view more details")
|
new OsuSpriteText
|
||||||
|
{
|
||||||
|
Text = BeatmapsetsStrings.ShowInfoPointsOfFailure,
|
||||||
|
Font = OsuFont.GetFont(weight: FontWeight.Bold, size: 14),
|
||||||
|
},
|
||||||
|
failRetryGraph = new FailRetryGraph
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Children = new Drawable[]
|
Padding = new MarginPadding { Top = 14 + spacing / 2 },
|
||||||
{
|
|
||||||
new OsuSpriteText
|
|
||||||
{
|
|
||||||
Text = BeatmapsetsStrings.ShowInfoPointsOfFailure,
|
|
||||||
Font = OsuFont.GetFont(weight: FontWeight.Bold, size: 14),
|
|
||||||
},
|
|
||||||
failRetryGraph = new FailRetryGraph
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
Padding = new MarginPadding { Top = 14 + spacing / 2 },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
loading = new LoadingLayer(true)
|
loading = new LoadingLayer(true)
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user