mirror of
https://github.com/ppy/osu
synced 2025-01-02 20:32:10 +00:00
Add xmldoc and tidy up logic in Skin
This commit is contained in:
parent
992a052426
commit
c93ed541f3
@ -61,11 +61,19 @@ namespace osu.Game.Skinning
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Remove all stored customisations for the provided target.
|
||||
/// </summary>
|
||||
/// <param name="targetContainer">The target container to reset.</param>
|
||||
public void ResetDrawableTarget(SkinnableElementTargetContainer targetContainer)
|
||||
{
|
||||
DrawableComponentInfo.Remove(targetContainer.Target);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update serialised information for the provided target.
|
||||
/// </summary>
|
||||
/// <param name="targetContainer">The target container to serialise to this skin.</param>
|
||||
public void UpdateDrawableTarget(SkinnableElementTargetContainer targetContainer)
|
||||
{
|
||||
DrawableComponentInfo[targetContainer.Target] = targetContainer.CreateSerialisedChildren().ToArray();
|
||||
@ -76,10 +84,7 @@ namespace osu.Game.Skinning
|
||||
switch (component)
|
||||
{
|
||||
case SkinnableTargetComponent target:
|
||||
|
||||
var skinnableTarget = target.Target;
|
||||
|
||||
if (!DrawableComponentInfo.TryGetValue(skinnableTarget, out var skinnableInfo))
|
||||
if (!DrawableComponentInfo.TryGetValue(target.Target, out var skinnableInfo))
|
||||
return null;
|
||||
|
||||
return new SkinnableTargetWrapper
|
||||
|
Loading…
Reference in New Issue
Block a user