BFRES : Fix material right click menu not applying shortcuts
This commit is contained in:
parent
d0fc51c57d
commit
15e6c1c7fd
@ -89,24 +89,27 @@ namespace Bfres.Structs
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public class FMAT : STGenericMaterial
|
public class FMAT : STGenericMaterial, IContextMenuNode
|
||||||
{
|
{
|
||||||
public FMAT()
|
public FMAT()
|
||||||
{
|
{
|
||||||
Checked = true;
|
Checked = true;
|
||||||
ImageKey = "material";
|
ImageKey = "material";
|
||||||
SelectedImageKey = "material";
|
SelectedImageKey = "material";
|
||||||
|
}
|
||||||
|
|
||||||
ContextMenuStrip = new STContextMenuStrip();
|
public ToolStripItem[] GetContextMenuItems()
|
||||||
|
{
|
||||||
|
List<ToolStripItem> Items = new List<ToolStripItem>();
|
||||||
|
Items.Add(new ToolStripMenuItem("Export", null, ExportAction, Keys.Control | Keys.E));
|
||||||
|
Items.Add(new ToolStripMenuItem("Replace", null, ReplaceAction, Keys.Control | Keys.R));
|
||||||
|
Items.Add(new ToolStripSeparator());
|
||||||
|
Items.Add(new ToolStripMenuItem("Copy", null, CopyAction, Keys.Control | Keys.C));
|
||||||
|
Items.Add(new ToolStripMenuItem("Rename", null, RenameAction, Keys.Control | Keys.N));
|
||||||
|
Items.Add(new ToolStripSeparator());
|
||||||
|
Items.Add(new ToolStripMenuItem("Delete", null, DeleteAction, Keys.Control | Keys.Delete));
|
||||||
|
|
||||||
ContextMenuStrip.Items.Add(new ToolStripMenuItem("Export", null, ExportAction, Keys.Control | Keys.E));
|
return Items.ToArray();
|
||||||
ContextMenuStrip.Items.Add(new ToolStripMenuItem("Replace", null, ReplaceAction, Keys.Control | Keys.R));
|
|
||||||
|
|
||||||
ContextMenuStrip.Items.Add(new ToolStripSeparator());
|
|
||||||
ContextMenuStrip.Items.Add(new ToolStripMenuItem("Copy", null, CopyAction, Keys.Control | Keys.C));
|
|
||||||
ContextMenuStrip.Items.Add(new ToolStripMenuItem("Rename", null, RenameAction, Keys.Control | Keys.N));
|
|
||||||
ContextMenuStrip.Items.Add(new ToolStripSeparator());
|
|
||||||
ContextMenuStrip.Items.Add(new ToolStripMenuItem("Delete", null, DeleteAction, Keys.Control | Keys.N));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void ExportAction(object sender, EventArgs args) { Export(); }
|
protected void ExportAction(object sender, EventArgs args) { Export(); }
|
||||||
|
Loading…
Reference in New Issue
Block a user