BFRES : Fix scene animation context menus.

This commit is contained in:
KillzXGaming 2020-01-05 12:40:30 -05:00
parent db81b19723
commit e741f3a087
2 changed files with 9 additions and 0 deletions

View file

@ -36,6 +36,7 @@ namespace Bfres.Structs
public ToolStripItem[] GetContextMenuItems()
{
List<ToolStripItem> Items = new List<ToolStripItem>();
Items.AddRange(base.GetContextMenuItems());
Items.Add(new ToolStripMenuItem("New Camera Animation", null, NewCameraAction, Keys.Control | Keys.C));
Items.Add(new ToolStripMenuItem("New Light Animation", null, NewLightAction, Keys.Control | Keys.L));
Items.Add(new ToolStripMenuItem("New Fog Animation", null, NewFogAction, Keys.Control | Keys.F));

View file

@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using Toolbox.Library;
using Toolbox.Library.Animations;
@ -85,6 +86,13 @@ namespace Bfres.Structs
public override void OnClick(TreeView treeView) => UpdateEditor();
public ToolStripItem[] GetContextMenuItems()
{
List<ToolStripItem> Items = new List<ToolStripItem>();
Items.AddRange(base.GetContextMenuItems());
return Items.ToArray();
}
public void UpdateEditor(){
((BFRES)Parent?.Parent?.Parent)?.LoadEditors(this);
}