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: "; }
private uiList_TreeNode Spawn_Node(GameObject gm, uiPanel parent) { uiList_TreeNode node = Create <uiList_TreeNode>(parent); node.tag = gm; node.Title = gm.name; node.onExpanded += Populate_Node; node.onClicked += (uiControl c) => { c.Parent.Collapse_All(); var sel = ((c as uiList_TreeNode).tag as GameObject); if (sel != selection) { selection = sel; } else if (!c.isChild) { selection = null; } Update_info(); if (selection != null) { (c as uiList_TreeNode).Expand(); } }; return(node); }
private void DevMenu_onLayout(uiPanel c) { list.Set_Width(200f); list.FloodY(); tabPanel.alignTop(); tabPanel.moveRightOf(list); }
private void Clps_errors_onLayout(uiPanel c) { var err_ico = c["err_ico"]; var err_lbl = c["err_lbl"]; err_lbl.moveRightOf(err_ico); err_lbl.CenterVertically(); }
private void Info_panel_onLayout(uiPanel c) { var_child_count.alignTop(); lbl_components.moveBelow(var_child_count); var_components.moveBelow(lbl_components); var_components.FloodXY(); }
private new void Layout(uiPanel p) { base.doLayout(); cList.alignTop(); cList.alignLeftSide(); cList.FloodY(); catPanel.moveRightOf(cList); catPanel.FloodXY(); }
private void PluginManager_onLayout(uiPanel c) { list.alignLeftSide(); control_panel.moveBelow(top_wrapper); control_panel.moveRightOf(list); list.moveBelow(top_wrapper); list.FloodY(); tabPanel.moveBelow(control_panel); tabPanel.moveRightOf(list); tabPanel.FloodXY(); }
private void Plugin_Update_Viewer_onLayout(uiPanel c) { msg_instruct.alignTop(5f); msg_instruct.alignLeftSide(); msg_instruct.FloodX(); mark_all.alignLeftSide(5f); mark_all.moveBelow(msg_instruct, 12f); list.moveBelow(mark_all, 5f); list.FloodXY(0f, 32f); btn_update.moveBelow(list, 2f); btn_update.CenterHorizontally(); }
public void Handle(uiPanel parent, uiControl[] controls) { uiControl last = null; foreach (uiControl c in controls.Where(c => c != null)) { if (last == null) { c.alignTop(); } else { c.moveBelow(last); } last = c; } }
public void Handle(uiPanel parent, uiControl[] controls) { var inner_area = parent.Get_Content_Area(); int COLS = Math.Max(1, (int)Math.Floor(inner_area.width / SIZE.x)); float cw = (float)COLS * SIZE.x; // content width float exSpace = (inner_area.width - cw); // left over space float off = exSpace * 0.5f; // How much offset to add to X on each row for (int i = 0; i < controls.Length; i++) { uiControl c = controls[i]; int x = (i % COLS); int y = (i / COLS); c.Set_Size(SIZE); float X = ((float)x * SIZE.x) + off; float Y = ((float)y * SIZE.y); c.Set_Pos(X, Y); } }
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 ContentPanel_onLayout(uiPanel c) { list.FloodXY(); }
private void BtnPanel_onLayout(uiPanel c) { btn_ok.alignLeftSide(); btn_later.alignRightSide(); }
private void Top_wrapper_onLayout(uiPanel c) { btn_store.alignLeftSide(); btn_donate.alignRightSide(); btn_donate.Set_Height(btn_store.Get_Height());// eh, match the store buttons height... }
private void PluginStore_onLayout(uiPanel c) { }