mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 15:44:04 +09:00
Apply review suggestions
This commit is contained in:
@ -48,7 +48,7 @@ namespace osu.Game.Rulesets.Catch.Tests
|
|||||||
}, false, false);
|
}, false, false);
|
||||||
});
|
});
|
||||||
|
|
||||||
AddAssert("fruit colour default-hyperdash", () => checkFruitHyperDashColour(drawableFruit, Catcher.DefaultHyperDashColour, legacyFruit));
|
AddAssert("default colour", () => checkFruitHyperDashColour(drawableFruit, Catcher.DefaultHyperDashColour, legacyFruit));
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestCase(false, true)]
|
[TestCase(false, true)]
|
||||||
@ -73,7 +73,7 @@ namespace osu.Game.Rulesets.Catch.Tests
|
|||||||
}, customCatcherHyperDashColour, true);
|
}, customCatcherHyperDashColour, true);
|
||||||
});
|
});
|
||||||
|
|
||||||
AddAssert("fruit colour custom-hyperdash", () => checkFruitHyperDashColour(drawableFruit, TestLegacySkin.CustomHyperDashFruitColour, legacyFruit));
|
AddAssert("custom colour", () => checkFruitHyperDashColour(drawableFruit, TestLegacySkin.CustomHyperDashFruitColour, legacyFruit));
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestCase(false)]
|
[TestCase(false)]
|
||||||
@ -96,7 +96,7 @@ namespace osu.Game.Rulesets.Catch.Tests
|
|||||||
}, true, false);
|
}, true, false);
|
||||||
});
|
});
|
||||||
|
|
||||||
AddAssert("fruit colour catcher-custom-hyperdash", () => checkFruitHyperDashColour(drawableFruit, TestLegacySkin.CustomHyperDashColour, legacyFruit));
|
AddAssert("catcher custom colour", () => checkFruitHyperDashColour(drawableFruit, TestLegacySkin.CustomHyperDashColour, legacyFruit));
|
||||||
}
|
}
|
||||||
|
|
||||||
private Drawable setupSkinHierarchy(Func<Drawable> getChild, bool customHyperDashCatcherColour = false, bool customHyperDashFruitColour = false, bool customHyperDashAfterColour = false)
|
private Drawable setupSkinHierarchy(Func<Drawable> getChild, bool customHyperDashCatcherColour = false, bool customHyperDashFruitColour = false, bool customHyperDashAfterColour = false)
|
||||||
@ -139,13 +139,12 @@ namespace osu.Game.Rulesets.Catch.Tests
|
|||||||
if (componentName == "fruit-pear")
|
if (componentName == "fruit-pear")
|
||||||
{
|
{
|
||||||
// convince CatchLegacySkinTransformer to use the LegacyFruitPiece for pear fruit.
|
// convince CatchLegacySkinTransformer to use the LegacyFruitPiece for pear fruit.
|
||||||
var texture = new Texture(Texture.WhitePixel.TextureGL)
|
return new Texture(Texture.WhitePixel.TextureGL)
|
||||||
{
|
{
|
||||||
Width = 1,
|
Width = 1,
|
||||||
Height = 1,
|
Height = 1,
|
||||||
ScaleAdjust = 1 / 96f
|
ScaleAdjust = 1 / 96f
|
||||||
};
|
};
|
||||||
return texture;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
@ -155,25 +154,16 @@ namespace osu.Game.Rulesets.Catch.Tests
|
|||||||
|
|
||||||
public IBindable<TValue> GetConfig<TLookup, TValue>(TLookup lookup)
|
public IBindable<TValue> GetConfig<TLookup, TValue>(TLookup lookup)
|
||||||
{
|
{
|
||||||
switch (lookup)
|
if (lookup is CatchSkinConfiguration config)
|
||||||
{
|
{
|
||||||
case CatchSkinConfiguration config when config == CatchSkinConfiguration.HyperDash:
|
if (config == CatchSkinConfiguration.HyperDash && customHyperDashCatcherColour)
|
||||||
if (customHyperDashCatcherColour)
|
|
||||||
return SkinUtils.As<TValue>(new Bindable<Color4>(CustomHyperDashColour));
|
return SkinUtils.As<TValue>(new Bindable<Color4>(CustomHyperDashColour));
|
||||||
|
|
||||||
return null;
|
if (config == CatchSkinConfiguration.HyperDashFruit && customHyperDashFruitColour)
|
||||||
|
|
||||||
case CatchSkinConfiguration config when config == CatchSkinConfiguration.HyperDashFruit:
|
|
||||||
if (customHyperDashFruitColour)
|
|
||||||
return SkinUtils.As<TValue>(new Bindable<Color4>(CustomHyperDashFruitColour));
|
return SkinUtils.As<TValue>(new Bindable<Color4>(CustomHyperDashFruitColour));
|
||||||
|
|
||||||
return null;
|
if (config == CatchSkinConfiguration.HyperDashAfterImage && customHyperDashAfterColour)
|
||||||
|
|
||||||
case CatchSkinConfiguration config when config == CatchSkinConfiguration.HyperDashAfterImage:
|
|
||||||
if (customHyperDashAfterColour)
|
|
||||||
return SkinUtils.As<TValue>(new Bindable<Color4>(CustomHyperDashAfterColour));
|
return SkinUtils.As<TValue>(new Bindable<Color4>(CustomHyperDashAfterColour));
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
Reference in New Issue
Block a user