Minor UI improvments & bugfixes

- improved "Copy text" option in right click menu, to display what exactly to copy
- added "Dump selected assets" option to right click menu
- added 'selected assets count' info to status strip when you select assets
- added 'exported count / total export count` info to status strip during export
- "Show error message" option on the "Debug" tab renamed to "Show all error messages" and is now disabled by default
- "fixed" an issue with getting stuck during the "Building tree structure" step
- fixed a bug with listSearch that could make it not work in some conditions
- fixed a rare bug for resource files with the same name, that caused their data to be overwritten and become incorrect
This commit is contained in:
VaDiM
2021-11-23 04:28:34 +02:00
parent 792850dbb2
commit 19c6c5fe73
8 changed files with 211 additions and 176 deletions

View File

@ -1243,6 +1243,8 @@ namespace AssetStudioGUI
reverseSort = false;
enableFiltering = false;
listSearch.Text = " Filter ";
if (tabControl1.SelectedIndex == 1)
assetListView.Select();
var count = filterTypeToolStripMenuItem.DropDownItems.Count;
for (var i = 1; i < count; i++)
@ -1275,7 +1277,10 @@ namespace AssetStudioGUI
}
}
tempClipboard = assetListView.HitTest(new Point(e.X, e.Y)).SubItem.Text;
var selectedElement = assetListView.HitTest(new Point(e.X, e.Y));
var subItemIndex = selectedElement.Item.SubItems.IndexOf(selectedElement.SubItem);
tempClipboard = selectedElement.SubItem.Text;
copyToolStripMenuItem.Text = $"Copy {assetListView.Columns[subItemIndex].Text}";
contextMenuStrip1.Show(assetListView, e.X, e.Y);
}
}
@ -1290,6 +1295,11 @@ namespace AssetStudioGUI
ExportAssets(ExportFilter.Selected, ExportType.Convert);
}
private void dumpSelectedAssetsToolStripMenuItem_Click(object sender, EventArgs e)
{
ExportAssets(ExportFilter.Selected, ExportType.Dump);
}
private void showOriginalFileToolStripMenuItem_Click(object sender, EventArgs e)
{
var selectasset = (AssetItem)assetListView.Items[assetListView.SelectedIndices[0]];
@ -1494,6 +1504,18 @@ namespace AssetStudioGUI
}
}
private void assetListView_SelectedIndexChanged(object sender, EventArgs e)
{
if (assetListView.SelectedIndices.Count > 1)
StatusStripUpdate($"Selected {assetListView.SelectedIndices.Count} assets.");
}
private void assetListView_VirtualItemsSelectionRangeChanged(object sender, ListViewVirtualItemsSelectionRangeChangedEventArgs e)
{
if (assetListView.SelectedIndices.Count > 1)
StatusStripUpdate($"Selected {assetListView.SelectedIndices.Count} assets.");
}
private List<AssetItem> GetSelectedAssets()
{
var selectedAssets = new List<AssetItem>(assetListView.SelectedIndices.Count);