mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 11:42:54 +08:00
Catch a second location
This commit is contained in:
parent
b092e6937a
commit
6c64cea057
@ -8,6 +8,7 @@ using osu.Framework.Allocation;
|
||||
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;
|
||||
@ -32,16 +33,23 @@ namespace osu.Game.Overlays.Settings
|
||||
|
||||
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[]
|
||||
|
@ -19,15 +19,15 @@ namespace osu.Game.Rulesets
|
||||
[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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user