mirror of
https://github.com/ppy/osu
synced 2024-12-28 09:52:56 +00:00
Combine private
skin variable into exposed one
This commit is contained in:
parent
2cb217e06c
commit
90093c1d9d
@ -24,9 +24,7 @@ namespace osu.Game.Screens.Edit
|
||||
/// <summary>
|
||||
/// The underlying beatmap skin.
|
||||
/// </summary>
|
||||
protected internal ISkin Skin => skin;
|
||||
|
||||
private readonly Skin skin;
|
||||
protected internal readonly Skin Skin;
|
||||
|
||||
/// <summary>
|
||||
/// The combo colours of this skin.
|
||||
@ -36,11 +34,11 @@ namespace osu.Game.Screens.Edit
|
||||
|
||||
public EditorBeatmapSkin(Skin skin)
|
||||
{
|
||||
this.skin = skin;
|
||||
Skin = skin;
|
||||
|
||||
ComboColours = new BindableList<Colour4>();
|
||||
if (skin.Configuration.ComboColours != null)
|
||||
ComboColours.AddRange(skin.Configuration.ComboColours.Select(c => (Colour4)c));
|
||||
if (Skin.Configuration.ComboColours != null)
|
||||
ComboColours.AddRange(Skin.Configuration.ComboColours.Select(c => (Colour4)c));
|
||||
ComboColours.BindCollectionChanged((_, __) => updateColours());
|
||||
}
|
||||
|
||||
@ -48,16 +46,16 @@ namespace osu.Game.Screens.Edit
|
||||
|
||||
private void updateColours()
|
||||
{
|
||||
skin.Configuration.CustomComboColours = ComboColours.Select(c => (Color4)c).ToList();
|
||||
Skin.Configuration.CustomComboColours = ComboColours.Select(c => (Color4)c).ToList();
|
||||
invokeSkinChanged();
|
||||
}
|
||||
|
||||
#region Delegated ISkin implementation
|
||||
|
||||
public Drawable GetDrawableComponent(ISkinComponent component) => skin.GetDrawableComponent(component);
|
||||
public Texture GetTexture(string componentName, WrapMode wrapModeS, WrapMode wrapModeT) => skin.GetTexture(componentName, wrapModeS, wrapModeT);
|
||||
public ISample GetSample(ISampleInfo sampleInfo) => skin.GetSample(sampleInfo);
|
||||
public IBindable<TValue> GetConfig<TLookup, TValue>(TLookup lookup) => skin.GetConfig<TLookup, TValue>(lookup);
|
||||
public Drawable GetDrawableComponent(ISkinComponent component) => Skin.GetDrawableComponent(component);
|
||||
public Texture GetTexture(string componentName, WrapMode wrapModeS, WrapMode wrapModeT) => Skin.GetTexture(componentName, wrapModeS, wrapModeT);
|
||||
public ISample GetSample(ISampleInfo sampleInfo) => Skin.GetSample(sampleInfo);
|
||||
public IBindable<TValue> GetConfig<TLookup, TValue>(TLookup lookup) => Skin.GetConfig<TLookup, TValue>(lookup);
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user