1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 07:33:20 +08:00

Remove remaining early base lookup calls which were missed

This commit is contained in:
Dean Herbert 2024-08-22 20:13:24 +09:00
parent 1435fe24ae
commit 46d55d5e61
No known key found for this signature in database
6 changed files with 2 additions and 30 deletions

View File

@ -33,10 +33,6 @@ namespace osu.Game.Rulesets.Mania.Skinning.Argon
if (containerLookup.Ruleset == null) if (containerLookup.Ruleset == null)
return base.GetDrawableComponent(lookup); return base.GetDrawableComponent(lookup);
// Skin has configuration.
if (base.GetDrawableComponent(lookup) is UserConfiguredLayoutContainer d)
return d;
switch (containerLookup.Component) switch (containerLookup.Component)
{ {
case GlobalSkinnableContainers.MainHUDComponents: case GlobalSkinnableContainers.MainHUDComponents:

View File

@ -97,10 +97,6 @@ namespace osu.Game.Skinning
switch (lookup) switch (lookup)
{ {
case GlobalSkinnableContainerLookup containerLookup: case GlobalSkinnableContainerLookup containerLookup:
if (base.GetDrawableComponent(lookup) is UserConfiguredLayoutContainer c)
return c;
switch (containerLookup.Component) switch (containerLookup.Component)
{ {
case GlobalSkinnableContainers.SongSelect: case GlobalSkinnableContainers.SongSelect:

View File

@ -359,9 +359,6 @@ namespace osu.Game.Skinning
switch (lookup) switch (lookup)
{ {
case GlobalSkinnableContainerLookup containerLookup: case GlobalSkinnableContainerLookup containerLookup:
if (base.GetDrawableComponent(lookup) is UserConfiguredLayoutContainer c)
return c;
switch (containerLookup.Component) switch (containerLookup.Component)
{ {
case GlobalSkinnableContainers.MainHUDComponents: case GlobalSkinnableContainers.MainHUDComponents:

View File

@ -14,6 +14,7 @@ using osu.Framework.Audio.Sample;
using osu.Framework.Bindables; using osu.Framework.Bindables;
using osu.Framework.Extensions.TypeExtensions; using osu.Framework.Extensions.TypeExtensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Textures; using osu.Framework.Graphics.Textures;
using osu.Framework.IO.Stores; using osu.Framework.IO.Stores;
using osu.Framework.Logging; using osu.Framework.Logging;
@ -196,7 +197,7 @@ namespace osu.Game.Skinning
if (!LayoutInfos.TryGetValue(containerLookup.Component, out var layoutInfo)) return null; if (!LayoutInfos.TryGetValue(containerLookup.Component, out var layoutInfo)) return null;
if (!layoutInfo.TryGetDrawableInfo(containerLookup.Ruleset, out var drawableInfos)) return null; if (!layoutInfo.TryGetDrawableInfo(containerLookup.Ruleset, out var drawableInfos)) return null;
return new UserConfiguredLayoutContainer return new Container
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
ChildrenEnumerable = drawableInfos.Select(i => i.CreateInstance()) ChildrenEnumerable = drawableInfos.Select(i => i.CreateInstance())

View File

@ -67,9 +67,6 @@ namespace osu.Game.Skinning
switch (lookup) switch (lookup)
{ {
case GlobalSkinnableContainerLookup containerLookup: case GlobalSkinnableContainerLookup containerLookup:
if (base.GetDrawableComponent(lookup) is UserConfiguredLayoutContainer c)
return c;
// Only handle global level defaults for now. // Only handle global level defaults for now.
if (containerLookup.Ruleset != null) if (containerLookup.Ruleset != null)
return null; return null;

View File

@ -1,15 +0,0 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Graphics.Containers;
namespace osu.Game.Skinning
{
/// <summary>
/// This signifies that a <see cref="Skin.GetDrawableComponent"/> call resolved a configuration created
/// by a user in their skin. Generally this should be given priority over any local defaults or overrides.
/// </summary>
public partial class UserConfiguredLayoutContainer : Container
{
}
}