Example #1
0
        public Label(Game game, Point location, string text)
            : base(game, text)
        {
            bounds = new Rectangle(location, new Size(0, 0));
            OnLoad(null);
            SizeF temp = TextTexture.getStringSize();

            if (temp.IsEmpty)
            {
                temp = new SizeF(1, 1);
            }
            TextTexture.TextureSize = new Size((int)temp.Width, (int)temp.Height);
            bounds = new Rectangle(location, new Size((int)temp.Width, (int)temp.Height));
        }