2013-03-18 13:52:27 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Windows.Forms;
|
2014-02-26 14:11:06 +00:00
|
|
|
|
using CodeImp.DoomBuilder.Windows;
|
2013-03-18 13:52:27 +00:00
|
|
|
|
|
|
|
|
|
namespace CodeImp.DoomBuilder.BuilderEffects
|
|
|
|
|
{
|
|
|
|
|
public partial class MenusForm : Form
|
|
|
|
|
{
|
|
|
|
|
public MenusForm() {
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// This invokes an action from control event
|
|
|
|
|
private void InvokeTaggedAction(object sender, EventArgs e) {
|
|
|
|
|
General.Interface.InvokeTaggedAction(sender, e);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// This registers with the core
|
|
|
|
|
public void Register() {
|
|
|
|
|
// Add the menus to the core
|
2014-02-26 14:11:06 +00:00
|
|
|
|
General.Interface.AddModesMenu(jitterItem, "002_modify");
|
|
|
|
|
General.Interface.AddModesButton(jitterButton, "002_modify");
|
2014-03-19 13:03:47 +00:00
|
|
|
|
|
|
|
|
|
for(int i = 0; i < importStripMenuItem.DropDownItems.Count; i++) {
|
|
|
|
|
General.Interface.AddMenu(importStripMenuItem.DropDownItems[i] as ToolStripMenuItem, MenuSection.FileImport);
|
|
|
|
|
}
|
2013-03-18 13:52:27 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// This unregisters from the core
|
|
|
|
|
public void Unregister() {
|
|
|
|
|
// Remove the menus from the core
|
2014-02-26 14:11:06 +00:00
|
|
|
|
General.Interface.RemoveMenu(jitterItem);
|
|
|
|
|
General.Interface.RemoveButton(jitterButton);
|
2014-03-19 13:03:47 +00:00
|
|
|
|
|
|
|
|
|
for (int i = 0; i < importStripMenuItem.DropDownItems.Count; i++) {
|
|
|
|
|
General.Interface.RemoveMenu(importStripMenuItem.DropDownItems[i] as ToolStripMenuItem);
|
|
|
|
|
}
|
2013-03-18 13:52:27 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|