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 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)); }