mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2026-05-14 11:54:32 +08:00
PedsForm support for texture variations and alternative drawables, Sorting entries by name in YtdForm and when viewing Ydd in ModelForm
This commit is contained in:
@@ -946,7 +946,13 @@ namespace CodeWalker.Forms
|
||||
bool check = true;
|
||||
if (dict != null)
|
||||
{
|
||||
List<KeyValuePair<uint, Drawable>> items = new List<KeyValuePair<uint, Drawable>>();
|
||||
foreach (var kvp in dict)
|
||||
{
|
||||
items.Add(kvp);
|
||||
}
|
||||
items.Sort((a, b) => { return a.Value?.Name?.CompareTo(b.Value?.Name ?? "") ?? 0; });
|
||||
foreach (var kvp in items)
|
||||
{
|
||||
AddDrawableTreeNode(kvp.Value, kvp.Key, check);
|
||||
check = false;
|
||||
|
||||
+3
-2
@@ -63,10 +63,11 @@ namespace CodeWalker.Forms
|
||||
|
||||
if ((TexDict.Textures == null) || (TexDict.Textures.data_items == null)) return;
|
||||
var texs = TexDict.Textures.data_items;
|
||||
List<Texture> texlist = new List<Texture>(texs);
|
||||
texlist.Sort((a, b) => { return a.Name?.CompareTo(b.Name) ?? 0; });
|
||||
|
||||
for (int i = 0; i < texs.Length; i++)
|
||||
foreach (var tex in texlist)
|
||||
{
|
||||
var tex = texs[i];
|
||||
ListViewItem lvi = TexturesListView.Items.Add(tex.Name);
|
||||
lvi.ToolTipText = tex.Name;
|
||||
lvi.Tag = tex;
|
||||
|
||||
Reference in New Issue
Block a user