Skip to content

Commit

Permalink
Merge pull request #29067 from bdach/report-daily-challenge
Browse files Browse the repository at this point in the history
Fix not being able to send chat reports on daily challenge screen
  • Loading branch information
peppy authored Jul 25, 2024
2 parents 12f237a + 8d89557 commit 6cc3e8a
Showing 1 changed file with 133 additions and 128 deletions.
261 changes: 133 additions & 128 deletions osu.Game/Screens/OnlinePlay/DailyChallenge/DailyChallenge.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
using osu.Framework.Extensions.ObjectExtensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Logging;
using osu.Framework.Screens;
Expand Down Expand Up @@ -126,169 +127,173 @@ private void load(AudioManager audio)
RelativeSizeAxes = Axes.Both,
},
new Header(ButtonSystemStrings.DailyChallenge.ToSentence(), null),
new GridContainer
new PopoverContainer
{
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding
Child = new GridContainer
{
Horizontal = WaveOverlayContainer.WIDTH_PADDING,
Top = Header.HEIGHT,
},
RowDimensions =
[
new Dimension(GridSizeMode.AutoSize),
new Dimension(GridSizeMode.Absolute, 10),
new Dimension(),
new Dimension(GridSizeMode.Absolute, 30),
new Dimension(GridSizeMode.Absolute, 50)
],
Content = new[]
{
new Drawable[]
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding
{
new DrawableRoomPlaylistItem(playlistItem)
{
RelativeSizeAxes = Axes.X,
AllowReordering = false,
Scale = new Vector2(1.4f),
Width = 1 / 1.4f,
}
Horizontal = WaveOverlayContainer.WIDTH_PADDING,
Top = Header.HEIGHT,
},
null,
RowDimensions =
[
new Container
new Dimension(GridSizeMode.AutoSize),
new Dimension(GridSizeMode.Absolute, 10),
new Dimension(),
new Dimension(GridSizeMode.Absolute, 30),
new Dimension(GridSizeMode.Absolute, 50)
],
Content = new[]
{
new Drawable[]
{
RelativeSizeAxes = Axes.Both,
Masking = true,
CornerRadius = 10,
Children = new Drawable[]
new DrawableRoomPlaylistItem(playlistItem)
{
new Box
{
RelativeSizeAxes = Axes.Both,
Colour = colourProvider.Background4,
},
new GridContainer
RelativeSizeAxes = Axes.X,
AllowReordering = false,
Scale = new Vector2(1.4f),
Width = 1 / 1.4f,
}
},
null,
[
new Container
{
RelativeSizeAxes = Axes.Both,
Masking = true,
CornerRadius = 10,
Children = new Drawable[]
{
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding(10),
ColumnDimensions =
[
new Dimension(),
new Dimension(GridSizeMode.Absolute, 10),
new Dimension(),
new Dimension(GridSizeMode.Absolute, 10),
new Dimension()
],
Content = new[]
new Box
{
RelativeSizeAxes = Axes.Both,
Colour = colourProvider.Background4,
},
new GridContainer
{
new Drawable?[]
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding(10),
ColumnDimensions =
[
new Dimension(),
new Dimension(GridSizeMode.Absolute, 10),
new Dimension(),
new Dimension(GridSizeMode.Absolute, 10),
new Dimension()
],
Content = new[]
{
new GridContainer
new Drawable?[]
{
RelativeSizeAxes = Axes.Both,
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
RowDimensions =
[
new Dimension(),
new Dimension()
],
Content = new[]
new GridContainer
{
new Drawable[]
RelativeSizeAxes = Axes.Both,
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
RowDimensions =
[
new Dimension(),
new Dimension()
],
Content = new[]
{
new DailyChallengeCarousel
new Drawable[]
{
RelativeSizeAxes = Axes.Both,
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Children = new Drawable[]
new DailyChallengeCarousel
{
new DailyChallengeTimeRemainingRing(),
breakdown = new DailyChallengeScoreBreakdown(),
RelativeSizeAxes = Axes.Both,
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Children = new Drawable[]
{
new DailyChallengeTimeRemainingRing(),
breakdown = new DailyChallengeScoreBreakdown(),
}
}
}
},
[
feed = new DailyChallengeEventFeed
{
RelativeSizeAxes = Axes.Both,
PresentScore = presentScore
}
],
},
[
feed = new DailyChallengeEventFeed
{
RelativeSizeAxes = Axes.Both,
PresentScore = presentScore
}
],
},
},
null,
// Middle column (leaderboard)
leaderboard = new DailyChallengeLeaderboard(room, playlistItem)
{
RelativeSizeAxes = Axes.Both,
PresentScore = presentScore,
},
// Spacer
null,
// Main right column
new GridContainer
{
RelativeSizeAxes = Axes.Both,
Content = new[]
null,
// Middle column (leaderboard)
leaderboard = new DailyChallengeLeaderboard(room, playlistItem)
{
new Drawable[]
RelativeSizeAxes = Axes.Both,
PresentScore = presentScore,
},
// Spacer
null,
// Main right column
new GridContainer
{
RelativeSizeAxes = Axes.Both,
Content = new[]
{
new SectionHeader("Chat")
new Drawable[]
{
new SectionHeader("Chat")
},
[new MatchChatDisplay(room) { RelativeSizeAxes = Axes.Both }]
},
[new MatchChatDisplay(room) { RelativeSizeAxes = Axes.Both }]
RowDimensions =
[
new Dimension(GridSizeMode.AutoSize),
new Dimension()
]
},
RowDimensions =
[
new Dimension(GridSizeMode.AutoSize),
new Dimension()
]
},
}
}
}
}
}
}
],
null,
[
new Container
{
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding
],
null,
[
new Container
{
Horizontal = -WaveOverlayContainer.WIDTH_PADDING,
},
Children = new Drawable[]
{
new Box
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding
{
RelativeSizeAxes = Axes.Both,
Colour = colourProvider.Background5,
Horizontal = -WaveOverlayContainer.WIDTH_PADDING,
},
footerButtons = new FillFlowContainer
Children = new Drawable[]
{
RelativeSizeAxes = Axes.Both,
Direction = FillDirection.Horizontal,
Padding = new MarginPadding(5),
Spacing = new Vector2(10),
Children = new Drawable[]
new Box
{
RelativeSizeAxes = Axes.Both,
Colour = colourProvider.Background5,
},
footerButtons = new FillFlowContainer
{
new PlaylistsReadyButton
RelativeSizeAxes = Axes.Both,
Direction = FillDirection.Horizontal,
Padding = new MarginPadding(5),
Spacing = new Vector2(10),
Children = new Drawable[]
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
RelativeSizeAxes = Axes.Y,
Size = new Vector2(250, 1),
Action = startPlay
new PlaylistsReadyButton
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
RelativeSizeAxes = Axes.Y,
Size = new Vector2(250, 1),
Action = startPlay
}
}
}
},
},
}
}
}
],
],
}
}
}
}
Expand Down

0 comments on commit 6cc3e8a

Please sign in to comment.