public GizmoAnimationEditor(AnimationEditor editor, GraphicsDevice device, Effect effect, PanelRenderingAnimationEditor control) : base(device, effect) { _editor = editor; _configuration = editor.Tool.Configuration; _control = control; }
public void Initialize(AnimationEditor editor, bool disableFrameControls = false) { _editor = editor; tbPlaySoundFrame.Enabled = !disableFrameControls; tbFlipEffectFrame.Enabled = !disableFrameControls; butPlaySound.Enabled = (_editor.Tool.ReferenceLevel != null && _editor.Tool.ReferenceLevel.Settings.GlobalSoundMap.Count > 0); ReloadSounds(); }
public FormAnimCommandsEditor(AnimationEditor editor, AnimationNode animation) { InitializeComponent(); animCommandEditor.Initialize(editor); _editor = editor; Initialize(animation); _editor.Tool.EditorEventRaised += Tool_EditorEventRaised; // Set window property handlers Configuration.LoadWindowProperties(this, _editor.Tool.Configuration); FormClosing += new FormClosingEventHandler((s, e) => Configuration.SaveWindowProperties(this, _editor.Tool.Configuration)); }
public AnimationUndoInstance(AnimationEditor parent, AnimationNode anim) : base(parent) { Animation = anim.Clone(); Valid = () => Parent.Animations.Count == AnimCount && Animation.DirectXAnimation != null && Animation.WadAnimation != null && Animation.Index >= 0 && Animation.Index < Parent.Animations.Count; UndoAction = () => { Parent.Animations[Animation.Index] = Animation; Parent.Tool.AnimationEditorAnimationChanged(Animation, true); }; RedoInstance = () => new AnimationUndoInstance(Parent, Parent.Animations[Animation.Index]); }
public FormStateChangesEditor(AnimationEditor editor, AnimationNode animation, WadStateChange newStateChange = null) { InitializeComponent(); _editor = editor; dgvControls.CreateNewRow = () => new WadStateChangeRow() { StateName = TrCatalog.GetStateName(_editor.Tool.DestinationWad.GameVersion, _editor.Moveable.Id.TypeId, 0) }; dgvControls.DataGridView = dgvStateChanges; dgvControls.Enabled = true; Initialize(animation, newStateChange); _editor.Tool.EditorEventRaised += Tool_EditorEventRaised; // Set window property handlers Configuration.LoadWindowProperties(this, _editor.Tool.Configuration); FormClosing += new FormClosingEventHandler((s, e) => Configuration.SaveWindowProperties(this, _editor.Tool.Configuration)); }
public FormReplaceAnimCommands(AnimationEditor editor, WadAnimCommand refCommand = null) { InitializeComponent(); _editor = editor; aceFind.Initialize(_editor, true); aceReplace.Initialize(_editor, true); aceFind.Command = refCommand == null ? new WadAnimCommand() { Type = WadAnimCommandType.SetPosition } : refCommand; aceReplace.Command = new WadAnimCommand() { Type = WadAnimCommandType.SetPosition }; // Set window property handlers Configuration.LoadWindowProperties(this, _editor.Tool.Configuration); FormClosing += new FormClosingEventHandler((s, e) => Configuration.SaveWindowProperties(this, _editor.Tool.Configuration)); UpdateUI(); }
public void PushAnimationChanged(AnimationEditor editor, List <AnimationNode> anims) => Push(anims.Select(anim => (new AnimationUndoInstance(editor, anim)) as UndoRedoInstance).ToList());
public void PushAnimationChanged(AnimationEditor editor, AnimationNode anim) => Push(new AnimationUndoInstance(editor, anim));
protected AnimationEditorUndoRedoInstance(AnimationEditor parent) { Parent = parent; AnimCount = Parent.Animations.Count; }