Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - tueda

Pages: [1]
1
Help requests / Text is not shown in some case
« on: 01 November 2013, 08:08:28 »
Sometimes we need to construct a whole panel before adding to GUI which includes RadioButton or other child widgets.
But no text is shown in that case.
I think the order independent scene construction is prefered by everyone.
I used TGUI.Net in .Net4.0(C#) / VS2010 / Windows7.

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);

            var panel = new Panel ();
            panel.Position = new Vector2f (200, 100);
            panel.Size = new Vector2f (400, 400);
            panel.BackgroundColor = Color.White;

            // Before
            var btn1 = panel.Add (new RadioButton ("widgets/Black.conf"));
            btn1.Text = "Hello, world 1";
            btn1.TextColor = Color.Black;

            //
            gui.Add (panel);

            // After
            var btn2 = panel.Add (new RadioButton ("widgets/Black.conf"));
            btn2.Text = "Hello, world 2";
            btn2.TextColor = Color.Black;
            btn2.Position = new Vector2f (0, 50);

            // quick hack.
            //btn1.TextFont = btn1.Parent.GlobalFont;
            //btn1.TextSize = 0;
        }
(quick hack made me happy ;) )

And I found TGUI is very good library.
Thank you very much!


2
Help requests / CombBox show duplicated ghost
« on: 31 October 2013, 03:58:09 »
CombBox shows one more duplicated ghost.
See attached image.
I used TGUI.Net 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);

            var combBox = gui.Add (new ComboBox ("widgets/Black.conf"));
            combBox.Position = new Vector2f (200,100);
            combBox.AddItem ("Chapter I.");
            combBox.AddItem ("Chapter II. ");
            combBox.AddItem ("Chapter III.");
        }

3
Help requests / 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;
           }
        }

4
Feature requests / Default Panel.Size should be > 0
« on: 31 October 2013, 02:48:34 »
Current default value of Panel.Size is (0,0).
This is not so good. I do not see anything in the default.
I suppose default size should be > 0 in anyway.
This helps many newbies.

5
General Discussion / Nothing happens in AnimationPicture
« on: 30 October 2013, 07:37:18 »
I always see the first picture forever.
What's wrong?
Code: [Select]
   var pic = gui.Add (new AnimatedPicture ());
   pic.AddFrame ("media/Face-Ako.png", 1000);
   pic.AddFrame ("media/Face-Bko.png", 1000);
   pic.AddFrame ("media/Face-Cko.png", 1000);
   pic.SetFrame (0);
   pic.Play ();
I used TGUI.Net-Master (latest development snapshot).

Pages: [1]