Esempio n. 1
0
        public Dev_Hierarchy_Browser()
        {
            onShown        += (uiControl c) => { Refresh(); };
            Autosize        = true;
            Autosize_Method = AutosizeMethod.FILL;

            list = uiControl.Create <uiListView>(this);
            list.Set_Width(300);
            list.Autosize = false;
            //list.CONFIRM_LAYOUT = true;


            info_panel                 = uiControl.Create <uiPanel>(this);
            info_panel.Scrollable      = false;
            info_panel.Autosize        = true;
            info_panel.Autosize_Method = AutosizeMethod.FILL;
            info_panel.onLayout       += Info_panel_onLayout;
            info_panel.Set_Padding(3);

            lbl_components      = Create <uiText>(info_panel);
            lbl_components.Text = "Scripts";

            var_components = Create <uiListView>(info_panel);
            //var_components.Autosize = false;

            var_child_count      = Create <uiVarText>(info_panel);
            var_child_count.Text = "Children: ";
        }
        public Plugin_StoreItem() : base(uiControlType.Panel)
        {
            Set_Padding(4, 2, 2, 2);
            Set_Margin(2, 2, 2, 2);
            //Set_Size(DEFAULT_WIDTH, DEFAULT_HEIGHT);
            Autosize_Method = AutosizeMethod.BLOCK;

            Util.Set_BG_Color(local_style.normal, new Color32(32, 32, 32, 200));
            Util.Set_BG_Color(local_style.hover, new Color32(64, 64, 64, 255));
            const float b = 0.5f;

            Border.normal.color = new Color(b, b, b, 1f);

            const float g = 0.8f;

            TextColor       = new Color(g, g, g, 1f);
            TextColor_Hover = Color.white;
            //Utility.Set_BG_Color(local_style.hover, new Color32(32, 40, 60, 255));

            uiText name = uiControl.Create <uiText>("name", this);

            name.Clone_Text_Style(this);
            name.TextStyle       = FontStyle.Bold;
            name.TextSize        = 14;
            name.Autosize_Method = AutosizeMethod.BLOCK;

            uiText auth = uiControl.Create <uiText>("author", this);

            auth.Clone_Text_Style(this);
            auth.TextStyle       = FontStyle.Normal;
            auth.TextSize        = 12;
            auth.Autosize_Method = AutosizeMethod.BLOCK;

            download_info = Create <uiCollapser>("download_info", this);
            download_info.Size_Height_Collapsed = 0;
            download_info.onLayout += Download_info_onLayout;
            download_info.Set_Margin(0);
            download_info.Set_Padding(0);
            //Util.Set_BG_Color(download_info.local_style.normal, new Color(0.1f, 0.5f, 1.0f));
            download_info.Set_Collapsed(true);

            progress_bar = Create <uiProgressBar>("progress", download_info);
            progress_bar.Set_Height(4f);
            progress_bar.Value = 0;
            progress_bar.show_progress_text = false;
            Util.Set_BG_Color(progress_bar.prog_bar.local_style.normal, new Color(0.1f, 0.5f, 1.0f));
            Util.Set_BG_Color(progress_bar.local_style.normal, new Color(0.1f, 0.1f, 0.1f));


            progress_text = uiControl.Create <uiVarText>("progress_text", download_info);
            progress_text.Clone_Text_Style(this);
            progress_text.TextAlign = TextAnchor.LowerRight;
            progress_text.TextStyle = FontStyle.Normal;
            progress_text.TextSize  = 12;
            progress_text.Text      = "Downloading:";
            //progress_text.Text = "0%";
        }
        public uiProgressBar() : base(uiControlType.Progress)
        {
            // Create the progress bar first so it renders behind everything else.
            prog_bar = Create <uiEmpty>(this);
            prog_bar.Set_Background(Util.Get_Gradient_Texture(64, GRADIENT_DIR.TOP_BOTTOM, new Color(0.1f, 0.5f, 1.0f), new Color(1f, 1f, 1f, 1f), true, 0.3f));
            prog_bar.FloodY();

            text = Create <uiText>(this);
            text.Autosize_Method = AutosizeMethod.FILL;
            text.TextAlign       = TextAnchor.MiddleCenter;
            text.disableBG       = true;
            //Util.Set_BG_Color(local_style.normal, new Color(0f, 0f, 0f, 0f));

            Value = 0f;
            update_progress_area();
        }
Esempio n. 4
0
        public uiCheckbox() : base(uiControlType.Checkbox)
        {
            Clickable = true;
            Autosize  = true;
            Set_Padding(1, 1, 1, 1);
            onClicked += UiCheckbox_onClicked;
            Min_Width  = CHECKBOX_SIZE;
            Min_Height = CHECKBOX_SIZE;


            //border.normal.color = new Color(1f, 1f, 1f, 0.8f);
            //Utility.Set_BG_Color(checkbox_style.normal, new Color(0f, 0f, 0f, 0.5f));
            //Utility.Set_BG_Color(checkmark_style.normal, new Color(1f, 1f, 1f, 0.9f));
            checkbox_style.normal.background  = TextureHelper.icon_checkbox;
            checkmark_style.normal.background = Util.Tint_Texture(TextureHelper.icon_checkmark, new Color(0.3f, 0.95f, 0.4f));

            label = Create <uiText>(this);
        }
Esempio n. 5
0
        public Plugin_Manager_List_Item() : base()
        {
            Autosize_Method = AutosizeMethod.BLOCK;
            Set_Height(50);
            Set_Margin(4, 4, 2, 0);
            Set_Padding(2, 0, 2, 0);
            Border.normal = new uiBorderStyleState()
            {
                color = new Color32(10, 10, 10, 255)
            };
            //Border.hover = new uiBorderStyleState() { color = new Color32(255, 255, 255, 255) };

            float shade = 0.2f;

            //set normal styles bg color

            Util.Set_BG_Color(local_style.normal, shade, shade, shade, 0.9f);
            local_style.active.background = Util.Get_Gradient_Texture(200, GRADIENT_DIR.TOP_BOTTOM, new Color(shade, shade, shade), new Color32(25, 99, 141, 255));

            shade += 0.3f;
            Util.Set_BG_Color(local_style.hover, shade, shade, shade, 0.5f);


            pl_icon = Create <uiIcon>("icon", this);

            pl_title           = Create <uiText>("title", this);
            pl_title.TextColor = new Color(1f, 1f, 1f);
            pl_title.TextStyle = FontStyle.Bold;
            pl_title.TextSize  = 16;

            pl_version           = Create <uiText>("version", this);
            pl_version.TextColor = new Color(0.7f, 0.7f, 0.7f, 0.9f);
            pl_version.TextStyle = FontStyle.Italic;
            pl_version.TextSize  = 12;

            pl_status = Create <uiText>("status", this);
            Util.Set_BG_Color(pl_status.local_style.normal, 0f, 0f, 0f, 0.3f);
            pl_status.Set_Padding(2, 1);
            pl_status.TextStyle = FontStyle.Bold;
            pl_status.TextSize  = 12;
            pl_status.TextAlign = TextAnchor.MiddleCenter;
            //pl_status.local_style.normal.textColor = Color.red;// plugin is disabled
            //pl_status.local_style.active.textColor = Color.green;// plugin is enabled
        }
        public uiListItem_Progress() : base(uiControlType.Progress)
        {
            title.inherits_text_style = true;
            // Create the progress bar first so it renders behind everything else.
            prog_bar = Create <uiEmpty>("progress_bar", this);
            prog_bar.Set_Background(new Color(0.1f, 0.5f, 1.0f));
            //prog_bar.Set_Background(Util.Get_Gradient_Texture(64, GRADIENT_DIR.TOP_BOTTOM, new Color(0.1f, 0.5f, 1.0f), new Color(0.2f, 0.6f, 1f, 1f), true, 0.3f));
            prog_bar.FloodY();
            this.Set_Child_Index(prog_bar, 0);// Move the progress bar to the back so it draws underneath all of the other controls here.

            prog_text = Create <uiText>(this);
            prog_text.Autosize_Method     = AutosizeMethod.FILL;
            prog_text.TextAlign           = TextAnchor.MiddleRight;
            prog_text.disableBG           = true;
            prog_text.inherits_text_style = true;

            progress = 0f;
            update_progress_area();
        }
        public PluginLoader_Watermark_Component() : base()
        {
            Autosize_Method = AutosizeMethod.GROW;
            Name            = "Watermark";
            //local_style.normal.background = null;
            Set_Padding(2);

            label           = Create <uiText>(this);
            label.TextColor = new Color(1f, 1f, 1f, 0.6f);
            label.TextSize  = 16;
            label.TextStyle = FontStyle.Bold;
            label.Text      = Loader.TITLE;


            icon = Create <uiIcon>(this);
            icon.local_style.normal.background = null;
            icon.Image = TextureHelper.icon_logo;
            icon.Tint  = new Color(1f, 1f, 1f, 0.6f);
            icon.Set_Size(36, 36);
        }
Esempio n. 8
0
        public static void Setup()
        {
            SiscosHooks.register(HOOK_ID.Level_Loaded, onLevelLoaded);
            Init();

            Root      = uiControl.Create <uiPanel>();
            Root.Name = "DebugUI";
            Root.Set_Padding(5);
            Root.FloodXY();
            Root.local_style.normal.background = null;
            Root.isVisible = false;                         //Because our State var is inactive by default

            var list = uiControl.Create <uiListView>(Root); // Using a uiListView to contain all of our debug var displays makes them all auto layout, which is nice

            list.alignLeftSide();
            list.alignTop(200);

            lbl_player_pos      = uiControl.Create <uiVarText>(list);
            lbl_player_pos.Text = "Player Pos:";
            lbl_player_pos.Set_Margin(0);
            lbl_player_pos.Set_Padding(0);

            lbl_cam_pos      = uiControl.Create <uiVarText>(list);
            lbl_cam_pos.Text = "Cam Pos:";
            lbl_cam_pos.Set_Margin(0);
            lbl_cam_pos.Set_Padding(0);

            lbl_cam_rot      = uiControl.Create <uiVarText>(list);
            lbl_cam_rot.Text = "Cam Rot:";
            lbl_cam_rot.Set_Margin(0);
            lbl_cam_rot.Set_Padding(0);


            lbl_debug_mode = uiControl.Create <uiText>(list);
            //lbl_debug_mode.isVisible = false;//only shows when the debug drawing mode isnt NONE

            uiControl.dbg_mouse_tooltip_style = new GUIStyle();
            uiControl.dbg_mouse_tooltip_style.normal.textColor = Color.white;
            Util.Set_BG_Color(uiControl.dbg_mouse_tooltip_style.normal, new Color(0f, 0f, 0f, 0.5f));
        }
        private void init()
        {
            TextStyle  = FontStyle.Bold;
            Clickable  = true;
            Selectable = true;
            onClicked += (uiControl c) => { if (_selectable)
                                            {
                                                Selected = !Selected;
                                            }
            };
            Autosize = true;
            //Autosize_Method = AutosizeMethod.BLOCK;

            Set_Padding(2);
            Set_Margin(2);

            Util.Set_BG_Color(local_style.normal, new Color32(32, 32, 32, 150));
            Util.Set_BG_Color(local_style.hover, new Color32(36, 36, 36, 255));
            Util.Set_BG_Color(local_style.active, new Color(0.2f, 0.4f, 1f, 1f));
            //Util.Set_BG_Color(local_style.active, new Color32(55, 55, 55, 255));

            Border.active.color = new Color32(255, 255, 255, 200);

            icon = uiControl.Create <uiIcon>("icon", this);
            icon.SizeConstraint = uiSizeConstraint.WIDTH_MATCHES_HEIGHT;
            icon.Set_Padding(2);
            icon.Autosize = true;

            title = uiControl.Create <uiText>("title", this);
            //title.TextSize = 12;
            title.inherits_text_style = true;


            description = uiControl.Create <uiTextArea>("desc", this);
            description.Set_Margin(1, 1, 1, 1);
            description.TextSize  = 12;
            description.TextStyle = FontStyle.Italic;
            description.TextColor = new Color32(255, 255, 255, 180);
            description.Text      = null;// collapsed by default.
        }
Esempio n. 10
0
        public uiIconButton() : base(uiControlType.Button)
        {
            Clickable       = true;
            Autosize        = true;
            Autosize_Method = AutosizeMethod.GROW;
            Set_Padding(2, 2, 1, 1);

            Border.normal.color        = new Color(1f, 1f, 1f, 0.3f);
            Border.hover.color         = new Color(1f, 1f, 1f, 0.8f);
            Border.normal.stipple_size = 2;
            Border.normal.stipple_gap  = 1;

            onClicked += Clicked_Snd_Handler;

            icon           = Create <uiIcon>("icon", this);
            icon.disableBG = true;

            text = Create <uiText>("text", this);
            text.inherits_text_style = true;
            text.Autosize            = true;
            text.Autosize_Method     = AutosizeMethod.GROW;
        }
        private void init()
        {
            Clickable       = true;
            Selectable      = true;
            Autosize_Method = AutosizeMethod.BLOCK;
            Autosize        = true;
            onClicked      += UiList_TreeNode_onClicked;

            Util.Set_BG_Color(local_style.normal, Color.clear);
            Util.Set_BG_Color(local_style.hover, new Color(0.2f, 0.2f, 0.2f, 0.4f));

            Set_Padding(2);
            Set_Margin(0);

            title = uiControl.Create <uiText>("title");
            Add_Control(title);
            title.disableBG = true;
            title.TextSize  = 12;

            icon = Create <uiIcon>();
            Add_Control(icon);
            icon.Set_Margin(0, 4);

            collapser = uiControl.Create <uiCollapser>();
            Add_Control(collapser);
            collapser.Autosize_Method = AutosizeMethod.BLOCK;
            collapser.Autosize        = true;
            collapser.Set_Margin(6, 0, 0, 0);
            collapser.Set_Padding(0);
            collapser.onCollapsed += (uiCollapser) => { onCollapsed?.Invoke(this); update_icon(); };
            collapser.onExpanded  += (uiCollapser) => { onExpanded?.Invoke(this); update_icon(); };
            collapser.Collapse();

            list                 = uiControl.Create <uiListView>(collapser);
            list.Scrollable      = false;
            list.Autosize_Method = AutosizeMethod.BLOCK;
            list.Autosize        = true;
            list.disableBG       = true;
        }
Esempio n. 12
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);
        }
Esempio n. 13
0
        public PluginManager()
        {
            onLayout += PluginManager_onLayout;
            Title     = "Plugin Manager";
            Set_Size(650, 400);
            Center();
            onShown  += PluginManager_onShown;
            onHidden += PluginManager_onHidden;

            list = Create <uiListView>(this);
            list.Set_Width(200f);
            list.Set_Margin(2, 0, 2, 2);


            top_wrapper = Create <uiWrapperPanel>(this);
            top_wrapper.Autosize_Method = AutosizeMethod.BLOCK;
            top_wrapper.Set_Margin(0, 0, 0, 2);
            top_wrapper.Set_Padding(2);
            top_wrapper.onLayout += Top_wrapper_onLayout;


            btn_store                     = Create <uiIconButton>(top_wrapper);
            btn_store.Text                = "Plugin Store";
            btn_store.Icon                = TextureHelper.icon_arrow_left;
            btn_store.Border.type         = uiBorderType.NONE;
            btn_store.Border.normal.color = Color.white;
            btn_store.Border.normal.size  = new RectOffset(1, 1, 1, 1);
            btn_store.onClicked          += (uiControl c) => { uiWindow.Switch(PluginStore.Instance); };


            btn_donate                 = Create <uiIcon>(top_wrapper);
            btn_donate.Text            = null;
            btn_donate.Image           = (Texture2D)TextureHelper.Load_From_Resource("donate_btn.png", "SR_PluginLoader", (TextureOpFlags.NO_MIPMAPPING & TextureOpFlags.NO_WRAPPING));
            btn_donate.Image_MouseOver = Util.Tint_Texture((Texture2D)TextureHelper.Load_From_Resource("donate_btn.png", "SR_PluginLoader", (TextureOpFlags.NO_MIPMAPPING & TextureOpFlags.NO_WRAPPING)), new Color(0.7f, 0.7f, 0.7f));
            btn_donate.Border.type     = uiBorderType.NONE;
            btn_donate.onClicked      += (uiControl c) => { Process.Start("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=DYGPA5XA4MWC2"); };


            //CONTROL PANEL
            control_panel = Create <uiCollapser>("control_panel", this);
            control_panel.Autosize_Method = AutosizeMethod.BLOCK;
            control_panel.Set_Margin(2, 2, 2, 0);
            control_panel.Set_Padding(2);
            Util.Set_BG_Color(control_panel.local_style.normal, new Color(0f, 0f, 0f, 0.2f));
            control_panel.onLayout += Control_panel_onLayout;
            control_panel.Collapse();


            pl_toggle           = Create <uiToggle>("pl_toggle", control_panel);
            pl_toggle.onChange += Pl_toggle_onChange;

            btn_copy_json      = Create <uiButton>("copy_json", control_panel);
            btn_copy_json.Text = "Copy Json";
            btn_copy_json.Set_Margin(3, 0);
            btn_copy_json.onClicked += Btn_copy_json_onClicked;


            // TABBED PANEL
            tabPanel = Create <uiTabPanel>(this);
            tabPanel.Autosize_Method = AutosizeMethod.FILL;
            tabPanel.disableBG       = true;
            tabPanel.Set_Margin(2);// This margin gives us that light colored area surrounding the list and tabpanel
            pl_tab = tabPanel.Add_Tab(PLUGIN_TAB_NAME);
            tabPanel.CurrentTab.onLayout += tabPanel_onLayout;
            tabPanel.onChanged           += TabPanel_onChanged;

            pl_tab.Set_Padding(3);// so we can distinguish where the plugin thumbnail's borders are


            // PLUGIN ERRORS PANEL
            pl_errors           = Create <uiCollapser>(pl_tab);
            pl_errors.onLayout += Clps_errors_onLayout;
            pl_errors.Collapse();

            var err_ico = Create <uiIcon>("err_ico", pl_errors);

            err_ico.Image = TextureHelper.icon_alert;
            err_ico.Set_Height(26);

            var err_lbl = Create <uiText>("err_lbl", pl_errors);

            err_lbl.TextColor = Color.red;
            err_lbl.Text      = "Plugin experienced errors while loading!";
            err_lbl.TextAlign = TextAnchor.MiddleLeft;
            err_lbl.Set_Margin(2, 0, 0, 0);


            // PLUGIN INFO

            pl_title = Create <uiText>("pl_title", pl_tab);
            pl_title.local_style.fontSize  = 22;
            pl_title.local_style.fontStyle = FontStyle.Bold;


            pl_auth = Create <uiText>("pl_author", pl_tab);
            pl_vers = Create <uiText>("pl_vers", pl_tab);
            pl_desc = Create <uiTextArea>("pl_desc", pl_tab);

            pl_thumb = Create <uiIcon>("pl_thumb", pl_tab);
            pl_thumb.Border.normal.color = new Color(0f, 0f, 0f, 0.3f);

            pl_desc.Set_Margin(2);
            pl_desc.Set_Background(new Color(0.1f, 0.1f, 0.1f, 0.4f));
            pl_desc.Set_Padding(2);
            pl_desc.Border.normal.color = new Color(0f, 0f, 0f, 0.3f);
            pl_desc.Autosize_Method     = AutosizeMethod.BLOCK;

            // INSTRUCTIONS TAB
            tab_ins = tabPanel.Add_Tab(INSTRUCTION_TAB_NAME);
            tabPanel.CurrentTab.onLayout += InstructionsTab_onLayout;

            ins_title           = Create <uiTextArea>(tabPanel);
            ins_title.Text      = "Settings";
            ins_title.TextSize  = 20;
            ins_title.TextStyle = FontStyle.Bold;

            ins_text           = Create <uiTextArea>(tabPanel);
            ins_text.Text      = "Select a plugin from the list on the left to manage it's settings.\nOr, to browse more plugins for download, click the \"Plugin Store\" button at the top left of this window!";
            ins_text.TextStyle = FontStyle.Italic;
            ins_text.Autosize  = true;


            tab_need_plugins              = tabPanel.Add_Tab(NEED_PLUGINS_TAB_NAME);
            tabPanel.CurrentTab.onLayout += NeedPluginsTab_onLayout;

            nop_wrapper           = Create <uiWrapperPanel>(tabPanel);
            nop_wrapper.onLayout += Nop_Wrapper_onLayout;

            ins_no_plugins_text           = Create <uiTextArea>(nop_wrapper);
            ins_no_plugins_text.Text      = "You do not have any plugins installed!\nVisit the plugin store to find and install new plugins.";
            ins_no_plugins_text.TextSize  = 16;
            ins_no_plugins_text.TextColor = new Color(1f, 0.1f, 0.1f, 0.9f);
            ins_no_plugins_text.TextStyle = FontStyle.Bold;
            ins_no_plugins_text.TextAlign = TextAnchor.UpperCenter;
            ins_no_plugins_text.Autosize  = true;
        }
        public PluginStore()
        {
            onLayout += PluginStore_onLayout;
            Title     = "Plugin Store";
            Set_Size(800, 600);
            Center();


            lbl_pl_count       = Create <uiVarText>(this);
            lbl_pl_count.Text  = "Total Plugins:";
            lbl_pl_count.Value = "0";
            lbl_pl_count.text_style.fontStyle = FontStyle.Bold;

            search           = uiControl.Create <uiTextbox>(this);
            search.onChange += Search_onChange;

            lbl_search      = uiControl.Create <uiText>(this);
            lbl_search.Text = "Search ";


            btn_config             = Create <uiIconButton>(this);
            btn_config.Text        = "Settings";
            btn_config.Icon        = TextureHelper.icon_arrow_left;
            btn_config.Border.type = uiBorderType.NONE;
            //btn_config.Skin = uiSkinPreset.FLAT;
            btn_config.Border.normal.color = Color.white;
            btn_config.Border.normal.size  = new RectOffset(1, 1, 1, 1);
            btn_config.onClicked          += Btn_config_onClicked;


            tabPanel = Create <uiTabPanel>(this);
            tabPanel.Add_Tab(MAIN_TAB_NAME);
            tabPanel.CurrentTab.onLayout += InfoTab_onLayout;
            tabPanel.Set_Margin(2);// This margin gives us that light colored area surrounding the list and tabpanel


            pl_title      = uiControl.Create <uiText>(tabPanel);
            pl_title.Text = "";
            var sty = new GUIStyle(pl_title.Style);

            sty.fontStyle = FontStyle.Bold;
            sty.fontSize  = 22;
            pl_title.Set_Style(sty);


            pl_auth      = uiControl.Create <uiText>(tabPanel);
            pl_auth.Text = "";

            pl_desc      = uiControl.Create <uiTextArea>(tabPanel);
            pl_desc.Text = "";
            pl_desc.Set_Padding(2);
            pl_desc.Border.normal.color = new Color(0f, 0f, 0f, 0.3f);


            install_btn = uiControl.Create <uiButton>(tabPanel);
            install_btn.local_style.fontSize  = 18;
            install_btn.local_style.fontStyle = FontStyle.Bold;
            install_btn.Text       = "Download";
            install_btn.onClicked += Install_btn_onClicked;
            Color blue = new Color(0.2f, 0.4f, 1f, 1f);

            Util.Set_BG_Gradient(install_btn.local_style.normal, 64, GRADIENT_DIR.TOP_BOTTOM, blue, new Color(0.5f, 0.5f, 0.5f, 1f) * blue);


            // INSTRUCTIONS TAB
            tabPanel.Add_Tab(INSTRUCTION_TAB_NAME);
            tabPanel.CurrentTab.onLayout += InstructionsTab_onLayout;;

            ins_title           = Create <uiTextArea>(tabPanel);
            ins_title.Text      = "Welcome";
            ins_title.TextSize  = 22;
            ins_title.TextStyle = FontStyle.Bold;

            ins_text           = Create <uiTextArea>(tabPanel);
            ins_text.Text      = "Here you can find and download new plugins.\nTo get started select a plugin from the list on the left to see more information about it.\nWhen you find a plugin you wish to install you can do so by clicking the \"Install\" button!";
            ins_text.TextStyle = FontStyle.Italic;
            ins_text.TextAlign = TextAnchor.UpperCenter;
            ins_text.Autosize  = true;

            statusPanel = Create <uiTabPanel>(this);
            statusPanel.Set_Width(200);
            statusPanel.Set_Margin(2, 0, 2, 2);
            statusPanel.onLayout += StatusPanel_onLayout;

            loading_tab       = statusPanel.Add_Tab("loading_tab");
            ld_text           = Create <uiTextArea>("ld_text", statusPanel);
            ld_text.Text      = "...";
            ld_text.TextSize  = 16;
            ld_text.TextAlign = TextAnchor.MiddleCenter;

            retry_pl_list_btn = Create <uiButton>(statusPanel);
            retry_pl_list_btn.Set_Margin(0, 0, 4, 0);
            retry_pl_list_btn.Text     = "Refresh";
            retry_pl_list_btn.TextSize = 16;
            Util.Set_BG_Gradient(retry_pl_list_btn.local_style.normal, 64, GRADIENT_DIR.TOP_BOTTOM, blue, new Color(0.5f, 0.5f, 0.5f, 1f) * blue);
            retry_pl_list_btn.onClicked += retry_btn_onClicked;
            retry_pl_list_btn.isVisible  = false;

            statusPanel.CurrentTab.onLayout += CurrentTab_onLayout;

            plugins_tab          = statusPanel.Add_Tab("plugins_tab");
            list                 = Create <uiListView>(plugins_tab);
            list.disableBG       = true;
            list.Autosize_Method = AutosizeMethod.FILL;
            list.FloodXY();

            loading_tab.Select();
        }
Esempio n. 15
0
 public uiVarText() : base(uiControlType.Text)
 {
     Autosize_Method = AutosizeMethod.GROW;
     _text           = Create <uiText>(this);
     _value          = Create <uiText>(this);
 }