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>";
        }
 private void Mark_all_onChange(uiCheckbox c, bool was_clicked)
 {
     foreach (uiControl child in list.Get_Children())
     {
         Plugin_Update_Item itm = child as Plugin_Update_Item;
         itm.isChecked = c.isChecked;
     }
 }
Ejemplo n.º 3
0
        public Plugin_Update_Item() : base()
        {
            Autosize_Method = AutosizeMethod.BLOCK;
            onClicked      += Plugin_Update_Item_onClicked;

            Border.normal.color = new Color(1f, 1f, 1f, 0.1f);
            Border.active.color = mySkin.settings.selectionColor;
            Border.normal.size  = new RectOffset(0, 0, 0, 1);

            Util.Set_BG_Color(local_style.normal, new Color32(32, 32, 32, 200));

            progress_bar = Create <uiProgressBar>(this);
            progress_bar.show_progress_text = false;
            Util.Set_BG_Color(progress_bar.prog_bar.local_style.normal, new Color(0.1f, 0.4f, 0.8f, 0.7f));
            progress_bar.onProgress += Progress_bar_onProgress;

            checkbox = Create <uiCheckbox>(this);
            checkbox.label.local_style.fontSize = 16;

            progress_text = Create <uiText>(this);
            progress_text.local_style.fontSize  = 11;
            progress_text.local_style.fontStyle = FontStyle.BoldAndItalic;
            //progress_text.local_style.normal.textColor = new Color(0.3f, 0.7f, 1.0f, 0.9f);
        }