Implementing custom entries

Implementing custom entries reads and creation
This commit is contained in:
2021-12-02 20:22:38 +01:00
parent 37b98f1e0c
commit b14b28a9a5
2 changed files with 13 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
@@ -115,6 +116,11 @@ namespace BMGEditor
Entries[j].text = ReadWideCharString();
}
m_File_Tbl.Entries.Sort((x, y) =>
{
int a = (int)x[70793394], b = (int)y[70793394];
return a.CompareTo(b);
});
int l = 0;
foreach (Bcsv.Entry bcsvEntry in m_File_Tbl.Entries)
{

View File

@@ -70,6 +70,13 @@ namespace BMGEditor
private void saveBMGbtn_Click(object sender, EventArgs e)
{
m_File.Entries.Sort((x, y) =>
{
string entryNameA = x.entryName, entryNameB = y.entryName;
return String.CompareOrdinal(entryNameA, entryNameB);
});
//m_FileTbl
m_File.WriteToFile();
}
}