mirror of
https://github.com/ppy/osu.git
synced 2024-12-13 08:32:57 +08:00
Rename references to DefaultSkin
to have Triangles
suffix
This commit is contained in:
parent
ea0a995cc9
commit
51841988bf
@ -87,7 +87,7 @@ namespace osu.Game.Rulesets.Catch.Tests
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private class TestSkin : DefaultSkin
|
private class TestSkin : DefaultSkinTriangles
|
||||||
{
|
{
|
||||||
public bool FlipCatcherPlate { get; set; }
|
public bool FlipCatcherPlate { get; set; }
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ namespace osu.Game.Rulesets.Mania.Tests.Editor
|
|||||||
[Test]
|
[Test]
|
||||||
public void TestDefaultSkin()
|
public void TestDefaultSkin()
|
||||||
{
|
{
|
||||||
AddStep("set default skin", () => skins.CurrentSkinInfo.Value = DefaultSkin.CreateInfo().ToLiveUnmanaged());
|
AddStep("set default skin", () => skins.CurrentSkinInfo.Value = DefaultSkinTriangles.CreateInfo().ToLiveUnmanaged());
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
@ -35,7 +35,7 @@ namespace osu.Game.Rulesets.Osu.Tests
|
|||||||
|
|
||||||
hitCircle.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty());
|
hitCircle.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty());
|
||||||
|
|
||||||
Child = new SkinProvidingContainer(new DefaultSkin(null))
|
Child = new SkinProvidingContainer(new DefaultSkinTriangles(null))
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Child = drawableHitCircle = new DrawableHitCircle(hitCircle)
|
Child = drawableHitCircle = new DrawableHitCircle(hitCircle)
|
||||||
|
@ -202,7 +202,7 @@ namespace osu.Game.Tests.Skins.IO
|
|||||||
skinManager.CurrentSkinInfo.Value.PerformRead(s =>
|
skinManager.CurrentSkinInfo.Value.PerformRead(s =>
|
||||||
{
|
{
|
||||||
Assert.IsFalse(s.Protected);
|
Assert.IsFalse(s.Protected);
|
||||||
Assert.AreEqual(typeof(DefaultSkin), s.CreateInstance(skinManager).GetType());
|
Assert.AreEqual(typeof(DefaultSkinTriangles), s.CreateInstance(skinManager).GetType());
|
||||||
|
|
||||||
new LegacySkinExporter(osu.Dependencies.Get<Storage>()).ExportModelTo(s, exportStream);
|
new LegacySkinExporter(osu.Dependencies.Get<Storage>()).ExportModelTo(s, exportStream);
|
||||||
|
|
||||||
@ -215,7 +215,7 @@ namespace osu.Game.Tests.Skins.IO
|
|||||||
{
|
{
|
||||||
Assert.IsFalse(s.Protected);
|
Assert.IsFalse(s.Protected);
|
||||||
Assert.AreNotEqual(originalSkinId, s.ID);
|
Assert.AreNotEqual(originalSkinId, s.ID);
|
||||||
Assert.AreEqual(typeof(DefaultSkin), s.CreateInstance(skinManager).GetType());
|
Assert.AreEqual(typeof(DefaultSkinTriangles), s.CreateInstance(skinManager).GetType());
|
||||||
});
|
});
|
||||||
|
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
|
@ -38,7 +38,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
[Test]
|
[Test]
|
||||||
public void TestEmptyLegacyBeatmapSkinFallsBack()
|
public void TestEmptyLegacyBeatmapSkinFallsBack()
|
||||||
{
|
{
|
||||||
CreateSkinTest(DefaultSkin.CreateInfo(), () => new LegacyBeatmapSkin(new BeatmapInfo(), null));
|
CreateSkinTest(DefaultSkinTriangles.CreateInfo(), () => new LegacyBeatmapSkin(new BeatmapInfo(), null));
|
||||||
AddUntilStep("wait for hud load", () => Player.ChildrenOfType<SkinnableTargetContainer>().All(c => c.ComponentsLoaded));
|
AddUntilStep("wait for hud load", () => Player.ChildrenOfType<SkinnableTargetContainer>().All(c => c.ComponentsLoaded));
|
||||||
AddAssert("hud from default skin", () => AssertComponentsFromExpectedSource(SkinnableTarget.MainHUDComponents, skinManager.CurrentSkin.Value));
|
AddAssert("hud from default skin", () => AssertComponentsFromExpectedSource(SkinnableTarget.MainHUDComponents, skinManager.CurrentSkin.Value));
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ namespace osu.Game.Tests.Visual.Navigation
|
|||||||
[Test]
|
[Test]
|
||||||
public void TestEditDefaultSkin()
|
public void TestEditDefaultSkin()
|
||||||
{
|
{
|
||||||
AddAssert("is default skin", () => skinManager.CurrentSkinInfo.Value.ID == SkinInfo.DEFAULT_SKIN);
|
AddAssert("is default skin", () => skinManager.CurrentSkinInfo.Value.ID == SkinInfo.DEFAULT_SKIN_TRIANGLES);
|
||||||
|
|
||||||
AddStep("open settings", () => { Game.Settings.Show(); });
|
AddStep("open settings", () => { Game.Settings.Show(); });
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ namespace osu.Game.Tests.Visual.Navigation
|
|||||||
AddStep("open skin editor", () => skinEditor.Show());
|
AddStep("open skin editor", () => skinEditor.Show());
|
||||||
|
|
||||||
// Until step required as the skin editor may take time to load (and an extra scheduled frame for the mutable part).
|
// Until step required as the skin editor may take time to load (and an extra scheduled frame for the mutable part).
|
||||||
AddUntilStep("is modified default skin", () => skinManager.CurrentSkinInfo.Value.ID != SkinInfo.DEFAULT_SKIN);
|
AddUntilStep("is modified default skin", () => skinManager.CurrentSkinInfo.Value.ID != SkinInfo.DEFAULT_SKIN_TRIANGLES);
|
||||||
AddAssert("is not protected", () => skinManager.CurrentSkinInfo.Value.PerformRead(s => !s.Protected));
|
AddAssert("is not protected", () => skinManager.CurrentSkinInfo.Value.PerformRead(s => !s.Protected));
|
||||||
|
|
||||||
AddUntilStep("export button enabled", () => Game.Settings.ChildrenOfType<SkinSection.ExportSkinButton>().SingleOrDefault()?.Enabled.Value == true);
|
AddUntilStep("export button enabled", () => Game.Settings.ChildrenOfType<SkinSection.ExportSkinButton>().SingleOrDefault()?.Enabled.Value == true);
|
||||||
|
@ -39,7 +39,7 @@ namespace osu.Game.Configuration
|
|||||||
{
|
{
|
||||||
// UI/selection defaults
|
// UI/selection defaults
|
||||||
SetDefault(OsuSetting.Ruleset, string.Empty);
|
SetDefault(OsuSetting.Ruleset, string.Empty);
|
||||||
SetDefault(OsuSetting.Skin, SkinInfo.DEFAULT_SKIN.ToString());
|
SetDefault(OsuSetting.Skin, SkinInfo.DEFAULT_SKIN_TRIANGLES.ToString());
|
||||||
|
|
||||||
SetDefault(OsuSetting.BeatmapDetailTab, PlayBeatmapDetailArea.TabType.Details);
|
SetDefault(OsuSetting.BeatmapDetailTab, PlayBeatmapDetailArea.TabType.Details);
|
||||||
SetDefault(OsuSetting.BeatmapDetailModsFilter, false);
|
SetDefault(OsuSetting.BeatmapDetailModsFilter, false);
|
||||||
|
@ -130,7 +130,7 @@ namespace osu.Game.Screens.Backgrounds
|
|||||||
|
|
||||||
case BackgroundSource.Skin:
|
case BackgroundSource.Skin:
|
||||||
// default skins should use the default background rotation, which won't be the case if a SkinBackground is created for them.
|
// default skins should use the default background rotation, which won't be the case if a SkinBackground is created for them.
|
||||||
if (skin.Value is DefaultSkin || skin.Value is DefaultLegacySkin)
|
if (skin.Value is DefaultSkinTriangles || skin.Value is DefaultLegacySkin)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
newBackground = new SkinBackground(skin.Value, getBackgroundTextureName());
|
newBackground = new SkinBackground(skin.Value, getBackgroundTextureName());
|
||||||
|
@ -22,26 +22,26 @@ using osuTK.Graphics;
|
|||||||
|
|
||||||
namespace osu.Game.Skinning
|
namespace osu.Game.Skinning
|
||||||
{
|
{
|
||||||
public class DefaultSkin : Skin
|
public class DefaultSkinTriangles : Skin
|
||||||
{
|
{
|
||||||
public static SkinInfo CreateInfo() => new SkinInfo
|
public static SkinInfo CreateInfo() => new SkinInfo
|
||||||
{
|
{
|
||||||
ID = osu.Game.Skinning.SkinInfo.DEFAULT_SKIN,
|
ID = osu.Game.Skinning.SkinInfo.DEFAULT_SKIN_TRIANGLES,
|
||||||
Name = "osu! (triangles)",
|
Name = "osu! (triangles)",
|
||||||
Creator = "team osu!",
|
Creator = "team osu!",
|
||||||
Protected = true,
|
Protected = true,
|
||||||
InstantiationInfo = typeof(DefaultSkin).GetInvariantInstantiationInfo()
|
InstantiationInfo = typeof(DefaultSkinTriangles).GetInvariantInstantiationInfo()
|
||||||
};
|
};
|
||||||
|
|
||||||
private readonly IStorageResourceProvider resources;
|
private readonly IStorageResourceProvider resources;
|
||||||
|
|
||||||
public DefaultSkin(IStorageResourceProvider resources)
|
public DefaultSkinTriangles(IStorageResourceProvider resources)
|
||||||
: this(CreateInfo(), resources)
|
: this(CreateInfo(), resources)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
[UsedImplicitly(ImplicitUseKindFlags.InstantiatedWithFixedConstructorSignature)]
|
[UsedImplicitly(ImplicitUseKindFlags.InstantiatedWithFixedConstructorSignature)]
|
||||||
public DefaultSkin(SkinInfo skin, IStorageResourceProvider resources)
|
public DefaultSkinTriangles(SkinInfo skin, IStorageResourceProvider resources)
|
||||||
: base(skin, resources)
|
: base(skin, resources)
|
||||||
{
|
{
|
||||||
this.resources = resources;
|
this.resources = resources;
|
@ -81,7 +81,7 @@ namespace osu.Game.Skinning
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int lastDefaultSkinIndex = sources.IndexOf(sources.OfType<DefaultSkin>().LastOrDefault());
|
int lastDefaultSkinIndex = sources.IndexOf(sources.OfType<DefaultSkinTriangles>().LastOrDefault());
|
||||||
|
|
||||||
// Ruleset resources should be given the ability to override game-wide defaults
|
// Ruleset resources should be given the ability to override game-wide defaults
|
||||||
// This is achieved by placing them before the last instance of DefaultSkin.
|
// This is achieved by placing them before the last instance of DefaultSkin.
|
||||||
|
@ -19,7 +19,7 @@ namespace osu.Game.Skinning
|
|||||||
[JsonObject(MemberSerialization.OptIn)]
|
[JsonObject(MemberSerialization.OptIn)]
|
||||||
public class SkinInfo : RealmObject, IHasRealmFiles, IEquatable<SkinInfo>, IHasGuidPrimaryKey, ISoftDelete, IHasNamedFiles
|
public class SkinInfo : RealmObject, IHasRealmFiles, IEquatable<SkinInfo>, IHasGuidPrimaryKey, ISoftDelete, IHasNamedFiles
|
||||||
{
|
{
|
||||||
internal static readonly Guid DEFAULT_SKIN = new Guid("2991CFD8-2140-469A-BCB9-2EC23FBCE4AD");
|
internal static readonly Guid DEFAULT_SKIN_TRIANGLES = new Guid("2991CFD8-2140-469A-BCB9-2EC23FBCE4AD");
|
||||||
internal static readonly Guid CLASSIC_SKIN = new Guid("81F02CD3-EEC6-4865-AC23-FAE26A386187");
|
internal static readonly Guid CLASSIC_SKIN = new Guid("81F02CD3-EEC6-4865-AC23-FAE26A386187");
|
||||||
internal static readonly Guid RANDOM_SKIN = new Guid("D39DFEFB-477C-4372-B1EA-2BCEA5FB8908");
|
internal static readonly Guid RANDOM_SKIN = new Guid("D39DFEFB-477C-4372-B1EA-2BCEA5FB8908");
|
||||||
|
|
||||||
|
@ -49,9 +49,9 @@ namespace osu.Game.Skinning
|
|||||||
|
|
||||||
public readonly Bindable<Skin> CurrentSkin = new Bindable<Skin>();
|
public readonly Bindable<Skin> CurrentSkin = new Bindable<Skin>();
|
||||||
|
|
||||||
public readonly Bindable<Live<SkinInfo>> CurrentSkinInfo = new Bindable<Live<SkinInfo>>(Skinning.DefaultSkin.CreateInfo().ToLiveUnmanaged())
|
public readonly Bindable<Live<SkinInfo>> CurrentSkinInfo = new Bindable<Live<SkinInfo>>(Skinning.DefaultSkinTriangles.CreateInfo().ToLiveUnmanaged())
|
||||||
{
|
{
|
||||||
Default = Skinning.DefaultSkin.CreateInfo().ToLiveUnmanaged()
|
Default = Skinning.DefaultSkinTriangles.CreateInfo().ToLiveUnmanaged()
|
||||||
};
|
};
|
||||||
|
|
||||||
private readonly SkinImporter skinImporter;
|
private readonly SkinImporter skinImporter;
|
||||||
@ -61,7 +61,7 @@ namespace osu.Game.Skinning
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The default skin.
|
/// The default skin.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Skin DefaultSkin { get; }
|
public Skin DefaultSkinTriangles { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The default legacy skin.
|
/// The default legacy skin.
|
||||||
@ -86,7 +86,7 @@ namespace osu.Game.Skinning
|
|||||||
var defaultSkins = new[]
|
var defaultSkins = new[]
|
||||||
{
|
{
|
||||||
DefaultLegacySkin = new DefaultLegacySkin(this),
|
DefaultLegacySkin = new DefaultLegacySkin(this),
|
||||||
DefaultSkin = new DefaultSkin(this),
|
DefaultSkinTriangles = new DefaultSkinTriangles(this),
|
||||||
};
|
};
|
||||||
|
|
||||||
// Ensure the default entries are present.
|
// Ensure the default entries are present.
|
||||||
@ -104,7 +104,7 @@ namespace osu.Game.Skinning
|
|||||||
CurrentSkin.Value = skin.NewValue.PerformRead(GetSkin);
|
CurrentSkin.Value = skin.NewValue.PerformRead(GetSkin);
|
||||||
};
|
};
|
||||||
|
|
||||||
CurrentSkin.Value = DefaultSkin;
|
CurrentSkin.Value = DefaultSkinTriangles;
|
||||||
CurrentSkin.ValueChanged += skin =>
|
CurrentSkin.ValueChanged += skin =>
|
||||||
{
|
{
|
||||||
if (!skin.NewValue.SkinInfo.Equals(CurrentSkinInfo.Value))
|
if (!skin.NewValue.SkinInfo.Equals(CurrentSkinInfo.Value))
|
||||||
@ -125,7 +125,7 @@ namespace osu.Game.Skinning
|
|||||||
|
|
||||||
if (randomChoices.Length == 0)
|
if (randomChoices.Length == 0)
|
||||||
{
|
{
|
||||||
CurrentSkinInfo.Value = Skinning.DefaultSkin.CreateInfo().ToLiveUnmanaged();
|
CurrentSkinInfo.Value = Skinning.DefaultSkinTriangles.CreateInfo().ToLiveUnmanaged();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -232,8 +232,8 @@ namespace osu.Game.Skinning
|
|||||||
if (CurrentSkin.Value is LegacySkin && CurrentSkin.Value != DefaultLegacySkin)
|
if (CurrentSkin.Value is LegacySkin && CurrentSkin.Value != DefaultLegacySkin)
|
||||||
yield return DefaultLegacySkin;
|
yield return DefaultLegacySkin;
|
||||||
|
|
||||||
if (CurrentSkin.Value != DefaultSkin)
|
if (CurrentSkin.Value != DefaultSkinTriangles)
|
||||||
yield return DefaultSkin;
|
yield return DefaultSkinTriangles;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -294,7 +294,7 @@ namespace osu.Game.Skinning
|
|||||||
Guid currentUserSkin = CurrentSkinInfo.Value.ID;
|
Guid currentUserSkin = CurrentSkinInfo.Value.ID;
|
||||||
|
|
||||||
if (items.Any(s => s.ID == currentUserSkin))
|
if (items.Any(s => s.ID == currentUserSkin))
|
||||||
scheduler.Add(() => CurrentSkinInfo.Value = Skinning.DefaultSkin.CreateInfo().ToLiveUnmanaged());
|
scheduler.Add(() => CurrentSkinInfo.Value = Skinning.DefaultSkinTriangles.CreateInfo().ToLiveUnmanaged());
|
||||||
|
|
||||||
Delete(items.ToList(), silent);
|
Delete(items.ToList(), silent);
|
||||||
});
|
});
|
||||||
@ -313,7 +313,7 @@ namespace osu.Game.Skinning
|
|||||||
skinInfo = DefaultLegacySkin.SkinInfo;
|
skinInfo = DefaultLegacySkin.SkinInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
CurrentSkinInfo.Value = skinInfo ?? DefaultSkin.SkinInfo;
|
CurrentSkinInfo.Value = skinInfo ?? DefaultSkinTriangles.SkinInfo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -112,7 +112,7 @@ namespace osu.Game.Skinning
|
|||||||
|
|
||||||
// Temporarily used to exclude undesirable ISkin implementations
|
// Temporarily used to exclude undesirable ISkin implementations
|
||||||
static bool isUserSkin(ISkin skin)
|
static bool isUserSkin(ISkin skin)
|
||||||
=> skin.GetType() == typeof(DefaultSkin)
|
=> skin.GetType() == typeof(DefaultSkinTriangles)
|
||||||
|| skin.GetType() == typeof(DefaultLegacySkin)
|
|| skin.GetType() == typeof(DefaultLegacySkin)
|
||||||
|| skin.GetType() == typeof(LegacySkin);
|
|| skin.GetType() == typeof(LegacySkin);
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ namespace osu.Game.Tests.Visual
|
|||||||
public abstract class SkinnableTestScene : OsuGridTestScene, IStorageResourceProvider
|
public abstract class SkinnableTestScene : OsuGridTestScene, IStorageResourceProvider
|
||||||
{
|
{
|
||||||
private Skin metricsSkin;
|
private Skin metricsSkin;
|
||||||
private Skin defaultSkin;
|
private Skin defaultSkinTriangles;
|
||||||
private Skin specialSkin;
|
private Skin specialSkin;
|
||||||
private Skin oldSkin;
|
private Skin oldSkin;
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ namespace osu.Game.Tests.Visual
|
|||||||
var dllStore = new DllResourceStore(GetType().Assembly);
|
var dllStore = new DllResourceStore(GetType().Assembly);
|
||||||
|
|
||||||
metricsSkin = new TestLegacySkin(new SkinInfo { Name = "metrics-skin" }, new NamespacedResourceStore<byte[]>(dllStore, "Resources/metrics_skin"), this, true);
|
metricsSkin = new TestLegacySkin(new SkinInfo { Name = "metrics-skin" }, new NamespacedResourceStore<byte[]>(dllStore, "Resources/metrics_skin"), this, true);
|
||||||
defaultSkin = new DefaultLegacySkin(this);
|
defaultSkinTriangles = new DefaultLegacySkin(this);
|
||||||
specialSkin = new TestLegacySkin(new SkinInfo { Name = "special-skin" }, new NamespacedResourceStore<byte[]>(dllStore, "Resources/special_skin"), this, true);
|
specialSkin = new TestLegacySkin(new SkinInfo { Name = "special-skin" }, new NamespacedResourceStore<byte[]>(dllStore, "Resources/special_skin"), this, true);
|
||||||
oldSkin = new TestLegacySkin(new SkinInfo { Name = "old-skin" }, new NamespacedResourceStore<byte[]>(dllStore, "Resources/old_skin"), this, true);
|
oldSkin = new TestLegacySkin(new SkinInfo { Name = "old-skin" }, new NamespacedResourceStore<byte[]>(dllStore, "Resources/old_skin"), this, true);
|
||||||
}
|
}
|
||||||
@ -63,7 +63,7 @@ namespace osu.Game.Tests.Visual
|
|||||||
|
|
||||||
Cell(0).Child = createProvider(null, creationFunction, beatmap);
|
Cell(0).Child = createProvider(null, creationFunction, beatmap);
|
||||||
Cell(1).Child = createProvider(metricsSkin, creationFunction, beatmap);
|
Cell(1).Child = createProvider(metricsSkin, creationFunction, beatmap);
|
||||||
Cell(2).Child = createProvider(defaultSkin, creationFunction, beatmap);
|
Cell(2).Child = createProvider(defaultSkinTriangles, creationFunction, beatmap);
|
||||||
Cell(3).Child = createProvider(specialSkin, creationFunction, beatmap);
|
Cell(3).Child = createProvider(specialSkin, creationFunction, beatmap);
|
||||||
Cell(4).Child = createProvider(oldSkin, creationFunction, beatmap);
|
Cell(4).Child = createProvider(oldSkin, creationFunction, beatmap);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user