Exemplo n.º 1
0
        public void OnUndo()
        {
            _editorCache.Refresh();

            FInspectorWindow.SetEvents(_selectedEvents);
            FInspectorWindow.SetTracks(_selectedTracks);
        }
Exemplo n.º 2
0
        private void DeselectEvent(FEventEditor eventEditor)
        {
            if (eventEditor == null || !eventEditor.IsSelected())
            {
                return;
            }

            Undo.RegisterCompleteObjectUndo(new Object[] { eventEditor, this }, "deselect Event");

            _selectedEvents.Remove(eventEditor);
            FInspectorWindow.SetEvents(_selectedEvents);

            eventEditor.OnDeselect();
        }
Exemplo n.º 3
0
        private void SelectEvent(FEventEditor eventEditor)
        {
            if (eventEditor == null || eventEditor.IsSelected())
            {
                return;
            }

            SelectTrack(eventEditor._trackEditor);
            Undo.RegisterCompleteObjectUndo(new Object[] { eventEditor, this }, "select Event");

            _selectedEvents.Add(eventEditor);
            FInspectorWindow.SetEvents(_selectedEvents);

            eventEditor.OnSelect();
        }
Exemplo n.º 4
0
        private void DeselectAll()
        {
            int numEvents = _selectedEvents.Count;
            int numTracks = _selectedTracks.Count;

            int totalSelected = numEvents + numTracks;

            if (totalSelected == 0)
            {
                return;
            }

            // tracks + events + window
            Object[] objsToSave = new Object[totalSelected + 1];

            int i = 0;

            for (int j = 0; j != numEvents; ++i, ++j)
            {
                objsToSave[i] = _selectedEvents[j];
            }

            for (int j = 0; j != numTracks; ++i, ++j)
            {
                objsToSave[i] = _selectedTracks[j];
            }

            objsToSave[totalSelected] = this;

            Undo.RegisterCompleteObjectUndo(objsToSave, "deselect all");

            for (int j = 0; j != numEvents; ++j)
            {
                _selectedEvents[j].OnDeselect();
            }

            for (int j = 0; j != numTracks; ++j)
            {
                _selectedTracks[j].OnDeselect();
            }

            _selectedEvents.Clear();
            _selectedTracks.Clear();

            FInspectorWindow.SetEvents(null);
            FInspectorWindow.SetTracks(null);
        }