Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSlider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,9 @@ public override void OnKilled()

private float sliderPathRadius;

protected override void SkinChanged(ISkinSource skin, bool allowFallback)
protected override void ApplySkin(ISkinSource skin, bool allowFallback)
{
base.SkinChanged(skin, allowFallback);
base.ApplySkin(skin, allowFallback);

Body.BorderSize = skin.GetConfig<OsuSkinConfiguration, float>(OsuSkinConfiguration.SliderBorderSize)?.Value ?? SliderBody.DEFAULT_BORDER_SIZE;
sliderPathRadius = skin.GetConfig<OsuSkinConfiguration, float>(OsuSkinConfiguration.SliderPathRadius)?.Value ?? OsuHitObject.OBJECT_RADIUS;
Expand Down
16 changes: 15 additions & 1 deletion osu.Game/Rulesets/Objects/Drawables/DrawableHitObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ protected virtual void UpdateState(ArmedState state)

#endregion

protected override void SkinChanged(ISkinSource skin, bool allowFallback)
protected sealed override void SkinChanged(ISkinSource skin, bool allowFallback)
{
base.SkinChanged(skin, allowFallback);

Expand All @@ -250,6 +250,20 @@ protected override void SkinChanged(ISkinSource skin, bool allowFallback)

AccentColour.Value = comboColours?.Count > 0 ? comboColours[combo.ComboIndex % comboColours.Count] : Color4.White;
}

ApplySkin(skin, allowFallback);

if (IsLoaded)
updateState(State.Value, true);
}

/// <summary>
/// Called when a change is made to the skin.
/// </summary>
/// <param name="skin">The new skin.</param>
/// <param name="allowFallback">Whether fallback to default skin should be allowed if the custom skin is missing this resource.</param>
protected virtual void ApplySkin(ISkinSource skin, bool allowFallback)
{
}

/// <summary>
Expand Down