mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-07-15 11:04:16 -04:00
Add "show original file" right click menu
This commit is contained in:
@ -69,6 +69,8 @@ namespace Unity_Studio
|
||||
|
||||
private PrivateFontCollection pfc = new PrivateFontCollection();
|
||||
|
||||
private AssetPreloadData selectasset;
|
||||
|
||||
[DllImport("gdi32.dll")]
|
||||
private static extern IntPtr AddFontMemResourceEx(IntPtr pbFont, uint cbFont, IntPtr pdv, [In] ref uint pcFonts);
|
||||
|
||||
@ -1856,5 +1858,21 @@ namespace Unity_Studio
|
||||
FMODreset();
|
||||
|
||||
}
|
||||
|
||||
private void showOriginalFileToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var args = $"/select, {selectasset.sourceFile.filePath}";
|
||||
var pfi = new ProcessStartInfo("explorer.exe", args);
|
||||
Process.Start(pfi);
|
||||
}
|
||||
|
||||
private void assetListView_MouseClick(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (e.Button == MouseButtons.Right)
|
||||
{
|
||||
selectasset = (AssetPreloadData)assetListView.Items[assetListView.SelectedIndices[0]];
|
||||
contextMenuStrip1.Show(assetListView, e.X, e.Y);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user