Gonzo.Elements.UIButton.AddImage C# (CSharp) Méthode

AddImage() public méthode

Adds an image to this button, because (you guessed it) sometimes buttons will be defined without images...
public AddImage ( UIImage Img ) : void
Img UIImage The image to add.
Résultat void
        public void AddImage(UIImage Img)
        {
            Image = Img;
            Image.Position = Position;

            m_Size = new Vector2();
            m_Size.X = Image.Texture.Width / 4;
            m_Size.Y = Image.Texture.Height;

            //Initialize to second frame in the image.
            m_SourcePosition = new Vector2((Image.Texture.Width / 4) * 2, 0.0f);

            if (m_Text != null)
                ScaleToText();
        }