LabelContent.AddTexture C# (CSharp) Method

AddTexture() public method

public AddTexture ( GUIFont, font, Texture2D texture, DialoguePosition, dp ) : Texture2D
font GUIFont,
texture UnityEngine.Texture2D
dp DialoguePosition,
return UnityEngine.Texture2D
    public Texture2D AddTexture(GUIFont font, Texture2D texture, DialoguePosition dp)
    {
        if(this.content.image != null)
        {
            Texture2D tex = this.content.image as Texture2D;
            Rect b = new Rect(this.bounds.x, this.bounds.y, this.bounds.width, this.bounds.height);
            b.x += dp.boxPadding.x+dp.contentP2Offset.x;
            b.y = texture.height-b.y-b.height-dp.contentP2Offset.y;
            texture = TextureDrawer.AddTexture(texture, b, tex.GetPixels());
        }
        else texture = font.AddTextTexture(texture, this, dp, dp.contentP2Offset);
        return texture;
    }