Label.AutoSize = true "AFTER" positioning is broken
« on: 31 October 2013, 03:33:38 »
If I set Label.AutoSize = true after positioning, calculated size value is invalid and text is chopped.
See attached image.
Is this the behavior you intended?
I used  TGUI.Net (latest development snapshot) downloading yesterday.

Code: [Select]
 
      static public void LoadWidgets (Gui gui) {
           // Create the background image
           var pic = gui.Add (new Picture ("media/Vanity.jpg"));
           pic.Size = new Vector2f (800, 600);

           for (var i = 0; i < 4; i++) {
               var label = gui.Add (new Label ("widgets/Black.conf"));
               label.Text = "Hello, world";
               label.Position = new Vector2f (50*i, 50*i);
               label.AutoSize = true;
               label.TextColor = Color.Red;
               label.BackgroundColor = Color.Black;
           }
        }

*

texus

  • *****
  • 1143
    • View Profile
    • Texus's Blog
Re: Label.AutoSize = true "AFTER" positioning is broken
« Reply #1 on: 31 October 2013, 08:11:47 »
It seems like this has already been fixed in the c++ version.

It must have been a change that I missed when changing the .Net port.
I'll try to fix this as soon as possible.

Edit: Fixed.
« Last Edit: 31 October 2013, 09:31:27 by texus »