Ejemplo n.º 1
0
        public override void OnInitialize()
        {
            mainPanel = new UIPanel();
            mainPanel.Left.Set(-290f, 1f);
            mainPanel.Top.Set(-620f, 1f);
            mainPanel.Width.Set(240f, 0f);
            mainPanel.Height.Set(520f, 0f);
            mainPanel.SetPadding(6);
            mainPanel.BackgroundColor = Color.Azure * 0.7f;

            int top = 0;

            UIText text = new UIText("Items:", 0.85f);

            text.Top.Set(top, 0f);
            mainPanel.Append(text);
            top += 20;

            UITabControl tabControl = new UITabControl();

            tabControl.Top.Set(top, 0f);
            tabControl.Height.Set(-top, 1f);
            tabControl.mainPanel.BackgroundColor = Color.Magenta * 0.7f;

            tabControl.AddTab("Fields", makeMainPanel());
            tabControl.AddTab("Other", makeOtherPanel());
            mainPanel.Append(tabControl);

            Append(mainPanel);
        }
Ejemplo n.º 2
0
        public override void OnInitialize()
        {
            base.OnInitialize();
            mainPanel = new UIPanel();
            width     = 240;
            height    = 520;
            mainPanel.SetPadding(6);
            mainPanel.BackgroundColor = Color.Azure * 0.7f;

            int top = 0;

            UIText text = new UIText("Items:", 0.85f);

            text.Top.Set(top, 0f);
            mainPanel.Append(text);
            top += 20;

            UITabControl tabControl = new UITabControl();

            tabControl.Top.Set(top, 0f);
            tabControl.Height.Set(-top, 1f);
            tabControl.mainPanel.BackgroundColor = Color.Magenta * 0.7f;

            tabControl.AddTab("Fields", makeMainPanel());
            tabControl.AddTab("Other", makeOtherPanel());
            mainPanel.Append(tabControl);

            AdjustMainPanelDimensions(mainPanel);
            Append(mainPanel);
        }