Fix sarc not showing menu properly on right clicking
This commit is contained in:
parent
8823f54ff6
commit
b6078e1432
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -104,7 +104,7 @@ namespace FirstPlugin.New
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void UnpackToFolder(object sender, EventArgs args)
|
||||
{
|
||||
|
||||
@ -169,7 +169,7 @@ namespace FirstPlugin.New
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public class SarcEntry : ArchiveFileInfo
|
||||
{
|
||||
@ -182,7 +182,9 @@ namespace FirstPlugin.New
|
||||
|
||||
public override Dictionary<string, string> ExtensionImageKeyLookup
|
||||
{
|
||||
get { return new Dictionary<string, string>()
|
||||
get
|
||||
{
|
||||
return new Dictionary<string, string>()
|
||||
{
|
||||
{ ".byml", "byaml" },
|
||||
{ ".byaml", "byaml" },
|
||||
@ -202,26 +204,6 @@ namespace FirstPlugin.New
|
||||
|
||||
string ext = Path.GetExtension(fullName);
|
||||
string SarcEx = SARCExt.SARC.GuessFileExtension(data);
|
||||
/* if (SarcEx == ".bfres" || ext == ".sbfres")
|
||||
{
|
||||
sarcEntry.ImageKey = "bfres";
|
||||
sarcEntry.SelectedImageKey = "bfres";
|
||||
}
|
||||
if (SarcEx == ".bntx")
|
||||
{
|
||||
sarcEntry.ImageKey = "bntx";
|
||||
sarcEntry.SelectedImageKey = "bntx";
|
||||
}
|
||||
if (SarcEx == ".byaml")
|
||||
{
|
||||
sarcEntry.ImageKey = "byaml";
|
||||
sarcEntry.SelectedImageKey = "byaml";
|
||||
}
|
||||
if (SarcEx == ".aamp")
|
||||
{
|
||||
sarcEntry.ImageKey = "aamp";
|
||||
sarcEntry.SelectedImageKey = "aamp";
|
||||
}*/
|
||||
return sarcEntry;
|
||||
}
|
||||
}
|
||||
|
@ -127,20 +127,16 @@ namespace FirstPlugin
|
||||
TreeView.Sort();
|
||||
}
|
||||
|
||||
public class FolderEntry : TreeNode, IContextMenuNode
|
||||
public class FolderEntry : TreeNode
|
||||
{
|
||||
public FolderEntry(string text, int imageIndex, int selectedImageIndex)
|
||||
{
|
||||
Text = text;
|
||||
ImageIndex = imageIndex;
|
||||
SelectedImageIndex = selectedImageIndex;
|
||||
}
|
||||
|
||||
public ToolStripItem[] GetContextMenuItems()
|
||||
{
|
||||
List<ToolStripItem> Items = new List<ToolStripItem>();
|
||||
Items.Add(new ToolStripMenuItem("Sort Childern", null, SortChildern, Keys.Control | Keys.W));
|
||||
return Items.ToArray();
|
||||
ContextMenu = new ContextMenu();
|
||||
ContextMenu.MenuItems.Add(new MenuItem("Sort Childern", SortChildern));
|
||||
}
|
||||
|
||||
private void SortChildern(object sender, EventArgs args)
|
||||
@ -342,22 +338,17 @@ namespace FirstPlugin
|
||||
{
|
||||
ImageKey = "fileBlank";
|
||||
SelectedImageKey = "fileBlank";
|
||||
}
|
||||
|
||||
public ToolStripItem[] GetContextMenuItems()
|
||||
{
|
||||
List<ToolStripItem> Items = new List<ToolStripItem>();
|
||||
Items.Add(new STToolStipMenuItem("Export Raw Data", null, Export, Keys.Control | Keys.E));
|
||||
Items.Add(new STToolStipMenuItem("Export Raw Data to File Location", null, ExportToFileLoc, Keys.Control | Keys.F));
|
||||
Items.Add(new STToolStipMenuItem("Replace Raw Data", null, Replace, Keys.Control | Keys.R));
|
||||
Items.Add(new STToolStripSeparator());
|
||||
Items.Add(new STToolStipMenuItem("Open With Text Editor", null, OpenTextEditor, Keys.Control | Keys.T));
|
||||
Items.Add(new STToolStripSeparator());
|
||||
Items.Add(new STToolStipMenuItem("Remove", null, Remove, Keys.Control | Keys.Delete));
|
||||
Items.Add(new STToolStipMenuItem("Rename", null, Rename, Keys.Control | Keys.N));
|
||||
return Items.ToArray();
|
||||
ContextMenuStrip = new STContextMenuStrip();
|
||||
ContextMenuStrip.Items.Add(new STToolStipMenuItem("Export Raw Data", null, Export, Keys.Control | Keys.E));
|
||||
ContextMenuStrip.Items.Add(new STToolStipMenuItem("Export Raw Data to File Location", null, ExportToFileLoc, Keys.Control | Keys.F));
|
||||
ContextMenuStrip.Items.Add(new STToolStipMenuItem("Replace Raw Data", null, Replace, Keys.Control | Keys.R));
|
||||
ContextMenuStrip.Items.Add(new STToolStripSeparator());
|
||||
ContextMenuStrip.Items.Add(new STToolStipMenuItem("Open With Text Editor", null, OpenTextEditor, Keys.Control | Keys.T));
|
||||
ContextMenuStrip.Items.Add(new STToolStripSeparator());
|
||||
ContextMenuStrip.Items.Add(new STToolStipMenuItem("Remove", null, Remove, Keys.Control | Keys.Delete));
|
||||
ContextMenuStrip.Items.Add(new STToolStipMenuItem("Rename", null, Rename, Keys.Control | Keys.N));
|
||||
}
|
||||
|
||||
public override void OnClick(TreeView treeView)
|
||||
{
|
||||
UpdateHexView();
|
||||
@ -632,4 +623,4 @@ namespace FirstPlugin
|
||||
return sarcEntry;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user