1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 13:32:54 +08:00

Merge branch 'master' into multi-spectator-flow-fixes

This commit is contained in:
Bartłomiej Dach 2023-08-01 19:03:48 +02:00 committed by GitHub
commit 5b6c3321cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 19 additions and 10 deletions

View File

@ -67,6 +67,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
[TestCase(1)]
[TestCase(4)]
[TestCase(9)]
public void TestGeneral(int count)
{
int[] userIds = getPlayerIds(count);

View File

@ -356,7 +356,7 @@ namespace osu.Game.Overlays.SkinEditor
{
new SettingsDropdown<SkinComponentsContainerLookup?>
{
Items = availableTargets.Select(t => t.Lookup),
Items = availableTargets.Select(t => t.Lookup).Distinct(),
Current = selectedTarget,
}
}

View File

@ -18,6 +18,13 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
{
}
protected override void LoadComplete()
{
base.LoadComplete();
Scheduler.AddDelayed(() => StatisticsPanel.ToggleVisibility(), 1000);
}
protected override APIRequest FetchScores(Action<IEnumerable<ScoreInfo>> scoresCallback) => null;
protected override APIRequest FetchNextPage(int direction, Action<IEnumerable<ScoreInfo>> scoresCallback) => null;

View File

@ -74,7 +74,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
);
// If we don't track the animating state, the animation will also occur when resizing the window.
isAnimating &= !Precision.AlmostEquals(Position, targetPos, 0.01f);
isAnimating &= !Precision.AlmostEquals(Size, targetSize, 0.5f);
}
/// <summary>

View File

@ -55,7 +55,8 @@ namespace osu.Game.Screens.Ranking
[Resolved]
private IAPIProvider api { get; set; }
private StatisticsPanel statisticsPanel;
protected StatisticsPanel StatisticsPanel { get; private set; }
private Drawable bottomPanel;
private Container<ScorePanel> detachedPanelContainer;
@ -98,7 +99,7 @@ namespace osu.Game.Screens.Ranking
RelativeSizeAxes = Axes.Both,
Children = new Drawable[]
{
statisticsPanel = CreateStatisticsPanel().With(panel =>
StatisticsPanel = CreateStatisticsPanel().With(panel =>
{
panel.RelativeSizeAxes = Axes.Both;
panel.Score.BindTarget = SelectedScore;
@ -107,7 +108,7 @@ namespace osu.Game.Screens.Ranking
{
RelativeSizeAxes = Axes.Both,
SelectedScore = { BindTarget = SelectedScore },
PostExpandAction = () => statisticsPanel.ToggleVisibility()
PostExpandAction = () => StatisticsPanel.ToggleVisibility()
},
detachedPanelContainer = new Container<ScorePanel>
{
@ -194,7 +195,7 @@ namespace osu.Game.Screens.Ranking
if (req != null)
api.Queue(req);
statisticsPanel.State.BindValueChanged(onStatisticsStateChanged, true);
StatisticsPanel.State.BindValueChanged(onStatisticsStateChanged, true);
}
protected override void Update()
@ -234,7 +235,7 @@ namespace osu.Game.Screens.Ranking
protected virtual APIRequest FetchNextPage(int direction, Action<IEnumerable<ScoreInfo>> scoresCallback) => null;
/// <summary>
/// Creates the <see cref="StatisticsPanel"/> to be used to display extended information about scores.
/// Creates the <see cref="Statistics.StatisticsPanel"/> to be used to display extended information about scores.
/// </summary>
protected virtual StatisticsPanel CreateStatisticsPanel() => new StatisticsPanel();
@ -272,9 +273,9 @@ namespace osu.Game.Screens.Ranking
public override bool OnBackButton()
{
if (statisticsPanel.State.Value == Visibility.Visible)
if (StatisticsPanel.State.Value == Visibility.Visible)
{
statisticsPanel.Hide();
StatisticsPanel.Hide();
return true;
}
@ -353,7 +354,7 @@ namespace osu.Game.Screens.Ranking
switch (e.Action)
{
case GlobalAction.Select:
statisticsPanel.ToggleVisibility();
StatisticsPanel.ToggleVisibility();
return true;
}