Nez.Portable/UI/Skin.cs
/// <summary>
/// Returns a tinted copy of a drawable found in the skin via getDrawable. Note that the new drawable is NOT
/// added to the skin! Tinting is only supported on SubtextureDrawables and NinePatchDrawables.
/// </summary>
/// <returns>The tinted drawable.</returns>
/// <param name="name">Name.</param>
/// <param name="tint">Tint.</param>
Returns a tinted copy of a drawable found in the skin via getDrawable. Note that the new drawable is NOT
added to the skin. Tinting is only supported on SubtextureDrawables and NinePatchDrawables.
Returns a tinted copy of a drawable found in the skin via getDrawable . Note that the new drawable is NOT added to the skin . Tinting is only supported on SubtextureDrawables and NinePatchDrawables .
public IDrawable newTintedDrawable(string name, Color tint)
        {
            var drawable = getDrawable(name);
            if (drawable is SubtextureDrawable)
                return (drawable as SubtextureDrawable).newTintedDrawable(tint);
            if (drawable is NinePatchDrawable)
                return (drawable as NinePatchDrawable).newTintedDrawable(tint);
            throw new Exception("Unable to copy, unknown or unsupported drawable type: " + drawable);
        }
public IDrawable newTintedDrawable ( string name , Color tint ) { var drawable = getDrawable ( name ) ; if ( drawable is SubtextureDrawable ) return ( drawable as SubtextureDrawable ) . newTintedDrawable ( tint ) ; if ( drawable is NinePatchDrawable ) return ( drawable as NinePatchDrawable ) . newTintedDrawable ( tint ) ; throw new Exception ( " " + drawable ) ; }
Returns a tinted copy of a drawable found in the skin via getDrawable.
Returns a tinted copy of a drawable found in the skin via getDrawable .
The tinted drawable.
The tinted drawable .
name
string
None
tint
Color
None