Пример #1
0
        void DoChartToggle()
        {
            LoadChartTexture();
            EditorGUILayout.BeginVertical(EditorStyles.helpBox, GUILayout.Width(130));
            Texture2D t = null;

            #region chart

            EditorGUILayout.BeginHorizontal();
            t = isShowPssChart ? pssChart : disableChart;
            isShowPssChart = GUILayout.Toggle(isShowPssChart, t, EditorStyles.label, GUILayout.Width(15), GUILayout.Height(15));
            GUILayout.Label("Pss", GUILayout.Width(40));
            GUILayout.Label(m_TreeView.GetPssMemory());
            EditorGUILayout.EndHorizontal();

            GUILayout.Space(5);
            EditorGUILayout.BeginHorizontal();
            t = isShowPowerChart ? powrChart : disableChart;
            isShowPowerChart = GUILayout.Toggle(isShowPowerChart, t, EditorStyles.label, GUILayout.Width(15), GUILayout.Height(15));
            GUILayout.Label("Power", GUILayout.Width(40));
            GUILayout.Label(m_TreeView.GetPower());
            EditorGUILayout.EndHorizontal();

            GUILayout.Space(5);
            EditorGUILayout.BeginHorizontal();
            t = isShowMonoChart ? monoChart : disableChart;
            isShowMonoChart = GUILayout.Toggle(isShowMonoChart, t, EditorStyles.label, GUILayout.Width(15), GUILayout.Height(15));
            GUILayout.Label("Mono  ", GUILayout.Width(40));
            GUILayout.Label(m_TreeView.GetMonoMemory());
            EditorGUILayout.EndHorizontal();

            GUILayout.Space(5);
            EditorGUILayout.BeginHorizontal();
            t = isShowLuaChart ? luaChart : disableChart;
            isShowLuaChart = GUILayout.Toggle(isShowLuaChart, t, EditorStyles.label, GUILayout.Width(15), GUILayout.Height(15));
            GUILayout.Label("Lua", GUILayout.Width(40));
            GUILayout.Label(m_TreeView.GetLuaMemory());
            EditorGUILayout.EndHorizontal();

            GUILayout.Space(5);
            EditorGUILayout.BeginHorizontal();
            t = isShowFpsChart ? fpsChart : disableChart;
            isShowFpsChart = GUILayout.Toggle(isShowFpsChart, t, EditorStyles.label, GUILayout.Width(15), GUILayout.Height(15));
            GUILayout.Label("Fps", GUILayout.Width(40));
            GUILayout.Label(m_TreeView.GetFPS());
            EditorGUILayout.EndHorizontal();

            GUILayout.Space(5);
            EditorGUILayout.BeginHorizontal();
            GUILayout.Space(15);
            GUILayout.Label("catch", GUILayout.Width(40));
            GUILayout.Label(m_TreeView.GetCatchedLuaMemory());
            EditorGUILayout.EndHorizontal();

            GUILayout.Space(1);
            GUILayout.FlexibleSpace();
            #endregion

            EditorGUILayout.EndVertical();
        }