public Plugin_Update_Viewer()
        {
            onLayout += Plugin_Update_Viewer_onLayout;
            Title     = "Updates Available";
            Set_Size(400, 500);
            CenterVertically();
            alignLeftSide(5f);
            onShown += Plugin_Update_Viewer_onShown;


            list                     = Create <uiScrollPanel>(this);
            list.Margin              = new RectOffset(5, 5, 0, 5);
            list.Padding             = new RectOffset(2, 2, 2, 2);
            list.onLayout           += List_onLayout;
            list.Border.normal.color = Color.grey;

            mark_all           = Create <uiCheckbox>(this);
            mark_all.text      = "Mark/Unmark All";
            mark_all.isChecked = true;
            mark_all.onChange += Mark_all_onChange;

            btn_update      = Create <uiButton>(this);
            btn_update.Text = "Update";
            btn_update.local_style.fontSize = 18;
            btn_update.onClicked           += Btn_start_onClicked;

            msg_instruct        = Create <uiTextArea>(this);
            msg_instruct.Margin = new RectOffset(3, 3, 3, 3);
            msg_instruct.Text   = "<b>Some of your plugins have updates available</b>\n<i><color=#BBBBBB>Select plugins to update then click the button at the bottom to begin!</color></i>";
        }
Beispiel #2
0
        public uiDialogResult()
        {
            Set_Size(450, 300);
            Center();

            message = Create <uiTextArea>("msg", this);
            message.Autosize_Method = AutosizeMethod.BLOCK;
            message.Autosize        = true;
            message.Text            = "Lorum Ipsum Lorum Ipsum\nLorum Ipsum Lorum Ipsum";
            message.TextColor       = new Color(0.6f, 0.6f, 0.6f, 1f);

            contentPanel = Create <uiScrollPanel>("content", this);
            contentPanel.Set_Margin(0, 6);

            btnPanel = Create <uiWrapperPanel>("btn_panel", this);
            btnPanel.Autosize_Method = AutosizeMethod.BLOCK;
            btnPanel.Autosize        = true;
            btnPanel.onLayout       += BtnPanel_onLayout;

            btn_ok            = Create <uiButton>("btn_ok", btnPanel);
            btn_ok.Text       = "OK";
            btn_ok.onClicked += (uiControl c) => { Result = DialogResult.OK; };
            btn_ok.Set_Padding(5, 2);

            btn_later            = Create <uiButton>("btn_later", btnPanel);
            btn_later.Text       = "Later";
            btn_later.onClicked += (uiControl c) => { Result = DialogResult.CANCEL; };
            btn_later.Set_Padding(5, 2);
        }
Beispiel #3
0
        public uiWindow() : base(uiControlType.Window)
        {
            ALL.Add(ID);

            isDraggable = true;  // among other things; this control cannot have it's position assigned via auto-positioners.
            Autosize    = false;
            isVisible   = false; //hidden by default
            Title       = "Window";
            //selfPadding = new RectOffset(0, 0, title_bar_height, 0);
            //local_style.fontStyle = FontStyle.Bold;
            //local_style.fontSize = 32;

            Setup_Titlebar();


            closeBtn = Create <uiButton>();
            GUIStyle sty = new GUIStyle();

            sty.normal.background       = TextureHelper.icon_close_dark;
            sty.hover.background        = TextureHelper.icon_close;
            closeBtn.Border.hover.size  = new RectOffset(1, 1, 1, 1);
            closeBtn.Border.hover.color = new Color(1f, 1f, 1f, 0.2f);
            closeBtn.Border.type        = uiBorderType.NONE;//we don't ever want the close button to render a border.

            closeBtn.Set_Size(title_bar_height, title_bar_height);
            closeBtn.Set_Style(sty);
            closeBtn.onClicked += CloseBtn_onClicked;
            closeBtn.Set_Margin(6);


            content_panel = Create <uiScrollPanel>();
            content_panel.Set_Margin(5, 5, 0, 5);
            content_panel.Autosize            = true;
            content_panel.Autosize_Method     = AutosizeMethod.FILL;
            content_panel.Border.normal.color = new Color(0f, 0f, 0f, 0.35f);// A semi-transparent black to darken the edges around the content area so it's more distinguishable.

            this.Add_Control(content_panel);
            this.Add_Control(closeBtn);

            this.layout_content_area();
        }
        /// <summary>
        /// Removing tabs by their index would be unreliable, so only removing by name will be supported.
        /// </summary>
        public void Remove_Tab(string name)
        {
            uiScrollPanel tab = (uiScrollPanel)this[name];

            Remove_Control(tab);
        }