コード例 #1
0
 public override void doLayout()
 {
     base.doLayout();
     list.FloodY();
     info_panel.moveRightOf(list);
     info_panel.FloodXY();
 }
コード例 #2
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));
        }