mirror of
https://github.com/osukey/osukey.git
synced 2025-05-29 09:27:18 +09:00
Update Resolved and Cached attribute issues
This commit is contained in:
parent
0a4e180ce7
commit
e23c71be80
@ -30,6 +30,7 @@ namespace osu.Game.Tests.Visual.SongSelect
|
|||||||
|
|
||||||
private readonly FailableLeaderboard leaderboard;
|
private readonly FailableLeaderboard leaderboard;
|
||||||
|
|
||||||
|
[Cached]
|
||||||
private readonly DialogOverlay dialogOverlay;
|
private readonly DialogOverlay dialogOverlay;
|
||||||
|
|
||||||
public TestSceneBeatmapLeaderboard()
|
public TestSceneBeatmapLeaderboard()
|
||||||
@ -39,13 +40,13 @@ namespace osu.Game.Tests.Visual.SongSelect
|
|||||||
Depth = -1
|
Depth = -1
|
||||||
});
|
});
|
||||||
|
|
||||||
leaderboard = new FailableLeaderboard
|
Add(leaderboard = new FailableLeaderboard
|
||||||
{
|
{
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Size = new Vector2(550f, 450f),
|
Size = new Vector2(550f, 450f),
|
||||||
Scope = BeatmapLeaderboardScope.Global,
|
Scope = BeatmapLeaderboardScope.Global,
|
||||||
};
|
});
|
||||||
|
|
||||||
AddStep(@"New Scores", newScores);
|
AddStep(@"New Scores", newScores);
|
||||||
AddStep(@"Show personal best", showPersonalBest);
|
AddStep(@"Show personal best", showPersonalBest);
|
||||||
@ -290,13 +291,5 @@ namespace osu.Game.Tests.Visual.SongSelect
|
|||||||
PlaceholderState = state;
|
PlaceholderState = state;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
|
||||||
private void load()
|
|
||||||
{
|
|
||||||
Dependencies.Cache(dialogOverlay);
|
|
||||||
|
|
||||||
Add(leaderboard);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,8 +17,8 @@ namespace osu.Game.Tests.Visual.SongSelect
|
|||||||
{
|
{
|
||||||
public class TestSceneUserTopScoreContainer : OsuTestScene
|
public class TestSceneUserTopScoreContainer : OsuTestScene
|
||||||
{
|
{
|
||||||
|
[Cached]
|
||||||
private readonly DialogOverlay dialogOverlay;
|
private readonly DialogOverlay dialogOverlay;
|
||||||
private readonly Container container;
|
|
||||||
|
|
||||||
public TestSceneUserTopScoreContainer()
|
public TestSceneUserTopScoreContainer()
|
||||||
{
|
{
|
||||||
@ -29,7 +29,7 @@ namespace osu.Game.Tests.Visual.SongSelect
|
|||||||
Depth = -1
|
Depth = -1
|
||||||
});
|
});
|
||||||
|
|
||||||
container = new Container
|
Add(new Container
|
||||||
{
|
{
|
||||||
Origin = Anchor.BottomCentre,
|
Origin = Anchor.BottomCentre,
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
@ -48,7 +48,7 @@ namespace osu.Game.Tests.Visual.SongSelect
|
|||||||
Anchor = Anchor.BottomCentre,
|
Anchor = Anchor.BottomCentre,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
});
|
||||||
|
|
||||||
var scores = new[]
|
var scores = new[]
|
||||||
{
|
{
|
||||||
@ -124,13 +124,5 @@ namespace osu.Game.Tests.Visual.SongSelect
|
|||||||
AddStep(@"Add score(rank 22333)", () => topScoreContainer.Score.Value = scores[2]);
|
AddStep(@"Add score(rank 22333)", () => topScoreContainer.Score.Value = scores[2]);
|
||||||
AddStep(@"Add null score", () => topScoreContainer.Score.Value = null);
|
AddStep(@"Add null score", () => topScoreContainer.Score.Value = null);
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
|
||||||
private void load()
|
|
||||||
{
|
|
||||||
Dependencies.Cache(dialogOverlay);
|
|
||||||
|
|
||||||
Add(container);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,6 +34,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
|
|
||||||
private readonly FailableLeaderboard leaderboard;
|
private readonly FailableLeaderboard leaderboard;
|
||||||
|
|
||||||
|
[Cached]
|
||||||
private readonly DialogOverlay dialogOverlay;
|
private readonly DialogOverlay dialogOverlay;
|
||||||
|
|
||||||
public TestSceneDeleteLocalScore()
|
public TestSceneDeleteLocalScore()
|
||||||
@ -43,7 +44,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
Depth = -1
|
Depth = -1
|
||||||
});
|
});
|
||||||
|
|
||||||
leaderboard = new FailableLeaderboard
|
Add(leaderboard = new FailableLeaderboard
|
||||||
{
|
{
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
@ -64,7 +65,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
},
|
},
|
||||||
Version = "Insane"
|
Version = "Insane"
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
AddStep("Insert Local Scores", reset);
|
AddStep("Insert Local Scores", reset);
|
||||||
}
|
}
|
||||||
@ -75,13 +76,6 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
leaderboard.RefreshScores();
|
leaderboard.RefreshScores();
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
|
||||||
private void load()
|
|
||||||
{
|
|
||||||
Dependencies.Cache(dialogOverlay);
|
|
||||||
Add(leaderboard);
|
|
||||||
}
|
|
||||||
|
|
||||||
private class FailableLeaderboard : BeatmapLeaderboard
|
private class FailableLeaderboard : BeatmapLeaderboard
|
||||||
{
|
{
|
||||||
private List<ScoreInfo> scoreList;
|
private List<ScoreInfo> scoreList;
|
||||||
@ -145,7 +139,8 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
|
|
||||||
private class TestLeaderboardScore : LeaderboardScore
|
private class TestLeaderboardScore : LeaderboardScore
|
||||||
{
|
{
|
||||||
private DialogOverlay dialogOverlay;
|
[Resolved]
|
||||||
|
private DialogOverlay dialogOverlay { get; set; }
|
||||||
|
|
||||||
private readonly FailableLeaderboard leaderboard;
|
private readonly FailableLeaderboard leaderboard;
|
||||||
|
|
||||||
@ -159,12 +154,6 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
{
|
{
|
||||||
dialogOverlay?.Push(new TestLocalScoreDeleteDialog(score, leaderboard));
|
dialogOverlay?.Push(new TestLocalScoreDeleteDialog(score, leaderboard));
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
|
||||||
private void load(DialogOverlay dialogOverlay)
|
|
||||||
{
|
|
||||||
this.dialogOverlay = dialogOverlay;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private class TestLocalScoreDeleteDialog : PopupDialog
|
private class TestLocalScoreDeleteDialog : PopupDialog
|
||||||
|
@ -55,7 +55,8 @@ namespace osu.Game.Online.Leaderboards
|
|||||||
|
|
||||||
private List<ScoreComponentLabel> statisticsLabels;
|
private List<ScoreComponentLabel> statisticsLabels;
|
||||||
|
|
||||||
private DialogOverlay dialogOverlay;
|
[Resolved]
|
||||||
|
private DialogOverlay dialogOverlay { get; set; }
|
||||||
|
|
||||||
public LeaderboardScore(ScoreInfo score, int rank, bool allowHighlight = true)
|
public LeaderboardScore(ScoreInfo score, int rank, bool allowHighlight = true)
|
||||||
{
|
{
|
||||||
@ -68,10 +69,9 @@ namespace osu.Game.Online.Leaderboards
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(IAPIProvider api, OsuColour colour, DialogOverlay overlay)
|
private void load(IAPIProvider api, OsuColour colour)
|
||||||
{
|
{
|
||||||
var user = score.User;
|
var user = score.User;
|
||||||
dialogOverlay = overlay;
|
|
||||||
|
|
||||||
statisticsLabels = GetStatistics(score).Select(s => new ScoreComponentLabel(s)).ToList();
|
statisticsLabels = GetStatistics(score).Select(s => new ScoreComponentLabel(s)).ToList();
|
||||||
|
|
||||||
|
@ -14,7 +14,8 @@ namespace osu.Game.Screens.Select
|
|||||||
{
|
{
|
||||||
public class BeatmapClearScoresDialog : PopupDialog
|
public class BeatmapClearScoresDialog : PopupDialog
|
||||||
{
|
{
|
||||||
private ScoreManager scoreManager;
|
[Resolved]
|
||||||
|
private ScoreManager scoreManager { get; set; }
|
||||||
|
|
||||||
public BeatmapClearScoresDialog(BeatmapInfo beatmap, Action onCompletion)
|
public BeatmapClearScoresDialog(BeatmapInfo beatmap, Action onCompletion)
|
||||||
{
|
{
|
||||||
@ -38,11 +39,5 @@ namespace osu.Game.Screens.Select
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
|
||||||
private void load(ScoreManager scoreManager)
|
|
||||||
{
|
|
||||||
this.scoreManager = scoreManager;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,8 @@ namespace osu.Game.Screens.Select
|
|||||||
{
|
{
|
||||||
public class LocalScoreDeleteDialog : PopupDialog
|
public class LocalScoreDeleteDialog : PopupDialog
|
||||||
{
|
{
|
||||||
private ScoreManager scoreManager;
|
[Resolved]
|
||||||
|
private ScoreManager scoreManager { get; set; }
|
||||||
|
|
||||||
public LocalScoreDeleteDialog(ScoreInfo score)
|
public LocalScoreDeleteDialog(ScoreInfo score)
|
||||||
{
|
{
|
||||||
@ -35,11 +36,5 @@ namespace osu.Game.Screens.Select
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
|
||||||
private void load(ScoreManager scoreManager)
|
|
||||||
{
|
|
||||||
this.scoreManager = scoreManager;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user