UltimateZoneBuilder/Source/Plugins/BuilderEffects/Interface/MenusForm.cs
MaxED 0369c969d1 According to dotnetperls.com, "new Dictionary<string, [anything]>(StringComparer.Ordinal)" works 17% faster than "new Dictionary<string, [anything]>()", so let's stick that everywhere and see what happens :)
Draw Curve Mode: added settings panel.
Sectors mode: added "Make Door" button to the toolbar.
Swapped Side panel and Info panel z-order. 
Interface: split toolbar into 3 separate toolbars. All toolbar buttons are now viewable at 1024x768.
Interface: grouped stuff in "Modes" menu a bit better.
Interface: added "Draw [stuff]" buttons to modes toolbar.
Interface: reorganized main menu. Hope it makes more sense now.
API: added General.Interface.AddModesButton() and General.Interface.AddModesMenu(), which can be used to add buttons to specific group in "Modes" toolbar and menu items to specific group in "Modes" menu, so actions, which behave like an editing mode, but are not part of one can be added there.
2014-02-26 14:11:06 +00:00

36 lines
1.1 KiB
C#

using System;
using System.Windows.Forms;
using CodeImp.DoomBuilder.Windows;
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
General.Interface.AddModesMenu(jitterItem, "002_modify");
General.Interface.AddModesButton(jitterButton, "002_modify");
General.Interface.AddMenu(importStripMenuItem, MenuSection.FileNewOpenClose);
General.Interface.AddMenu(exportStripMenuItem, MenuSection.FileNewOpenClose);
}
// This unregisters from the core
public void Unregister() {
// Remove the menus from the core
General.Interface.RemoveMenu(jitterItem);
General.Interface.RemoveButton(jitterButton);
General.Interface.RemoveMenu(importStripMenuItem);
General.Interface.RemoveMenu(exportStripMenuItem);
}
}
}