Beispiel #1
0
        void DrawToolBar(EventDataPlayerSession session)
        {
            EditorGUILayout.BeginHorizontal(EditorStyles.toolbar);
            GUILayout.FlexibleSpace();
            m_Record = GUILayout.Toggle(m_Record, "Record", EditorStyles.toolbarButton, GUILayout.ExpandWidth(false));

            if (GUILayout.Button("Clear", EditorStyles.toolbarButton))
            {
                RegisterEventHandler(false);
                session.Clear();
                if (m_GraphList != null)
                {
                    m_GraphList.Reload();
                }
                RegisterEventHandler(true);
            }
            if (GUILayout.Button("Load", EditorStyles.toolbarButton))
            {
                EditorUtility.DisplayDialog("Feature not implemented", "Saving and loading profile data is not yet supported", "Close");
            }
            if (GUILayout.Button("Save", EditorStyles.toolbarButton))
            {
                EditorUtility.DisplayDialog("Feature not implemented", "Saving and loading profile data is not yet supported", "Close");
            }

            GUILayout.FlexibleSpace();
            GUILayout.Label(m_InspectFrame == m_LatestFrame ? "Frame:     " : "Frame: " + m_InspectFrame + "/" + m_LatestFrame, EditorStyles.miniLabel);

            using (new EditorGUI.DisabledScope(m_InspectFrame <= 0))
                if (GUILayout.Button(m_PrevFrameIcon, EditorStyles.toolbarButton))
                {
                    SetInspectFrame(m_InspectFrame - 1);
                }


            using (new EditorGUI.DisabledScope(m_InspectFrame >= m_LatestFrame))
                if (GUILayout.Button(m_NextFrameIcon, EditorStyles.toolbarButton))
                {
                    SetInspectFrame(m_InspectFrame + 1);
                }


            if (GUILayout.Button("Current", EditorStyles.toolbarButton, GUILayout.ExpandWidth(false)))
            {
                SetInspectFrame(m_LatestFrame);
            }

            GUILayout.EndHorizontal();
        }
Beispiel #2
0
        void DrawToolBar(EventDataPlayerSession session)
        {
            EditorGUILayout.BeginHorizontal(EditorStyles.toolbar);

            if (GUILayout.Button("Clear Events", EditorStyles.toolbarButton))
            {
                RegisterEventHandler(false);
                session.Clear();
                m_GraphList?.Reload();
                RegisterEventHandler(true);
            }

            if (m_GraphList != null && m_GraphList.HasHiddenEvents && GUILayout.Button("Unhide All Hidden Events", EditorStyles.toolbarButton))
            {
                m_GraphList.UnhideAllHiddenEvents();
            }

            GUILayout.FlexibleSpace();
            GUILayout.Label(m_InspectFrame == m_LatestFrame ? "Frame:     " : "Frame: " + m_InspectFrame + "/" + m_LatestFrame, EditorStyles.miniLabel);

            using (new EditorGUI.DisabledScope(m_InspectFrame <= 0))
                if (GUILayout.Button(m_PrevFrameIcon, EditorStyles.toolbarButton))
                {
                    SetInspectFrame(m_InspectFrame - 1);
                }

            using (new EditorGUI.DisabledScope(m_InspectFrame >= m_LatestFrame))
                if (GUILayout.Button(m_NextFrameIcon, EditorStyles.toolbarButton))
                {
                    SetInspectFrame(m_InspectFrame + 1);
                }

            if (GUILayout.Button("Current", EditorStyles.toolbarButton, GUILayout.ExpandWidth(false)))
            {
                SetInspectFrame(m_LatestFrame);
            }

            GUILayout.EndHorizontal();
        }