Skip to content

Commit

Permalink
Catch a second location
Browse files Browse the repository at this point in the history
  • Loading branch information
peppy committed Jun 29, 2022
1 parent b092e69 commit 6c64cea
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
24 changes: 16 additions & 8 deletions osu.Game/Overlays/Settings/SettingsFooter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using osu.Framework.Development;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Logging;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Sprites;
Expand All @@ -32,16 +33,23 @@ private void load(OsuGameBase game, RulesetStore rulesets)

foreach (var ruleset in rulesets.AvailableRulesets)
{
var icon = new ConstrainedIconContainer
try
{
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
Icon = ruleset.CreateInstance().CreateIcon(),
Colour = Color4.Gray,
Size = new Vector2(20),
};
var icon = new ConstrainedIconContainer
{
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
Icon = ruleset.CreateInstance().CreateIcon(),
Colour = Color4.Gray,
Size = new Vector2(20),
};

modes.Add(icon);
modes.Add(icon);
}
catch
{
Logger.Log($"Could not create ruleset icon for {ruleset.Name}. Please check for an update from the developer.", level: LogLevel.Error);
}
}

Children = new Drawable[]
Expand Down
6 changes: 3 additions & 3 deletions osu.Game/Rulesets/RulesetSelector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ public abstract class RulesetSelector : TabControl<RulesetInfo>
[BackgroundDependencyLoader]
private void load()
{
foreach (var r in Rulesets.AvailableRulesets)
foreach (var ruleset in Rulesets.AvailableRulesets)
{
try
{
AddItem(r);
AddItem(ruleset);
}
catch
{
Logger.Log($"Could not create ruleset icon for {r.Name}. Please check for an update.", level: LogLevel.Error);
Logger.Log($"Could not create ruleset icon for {ruleset.Name}. Please check for an update from the developer.", level: LogLevel.Error);
}
}
}
Expand Down

0 comments on commit 6c64cea

Please sign in to comment.