Skip to content

Commit 7dcefac

Browse files
committed
1 parent 6454e59 commit 7dcefac

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

src/Core/Classes/UEnumDecompiler.cs

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,32 @@ public override string FormatHeader()
2727

2828
private string FormatNames()
2929
{
30-
var output = string.Empty;
30+
string output = string.Empty;
3131
UDecompilingState.AddTabs(1);
32-
for (var index = 0; index < Names.Count; index++)
32+
33+
for (int index = 0; index < Names.Count; index++)
3334
{
34-
var enumName = Names[index];
35-
output += "\r\n" + UDecompilingState.Tabs + enumName;
35+
var enumTagName = Names[index];
36+
string enumTagText = enumTagName.ToString();
37+
3638
if (index != Names.Count - 1)
3739
{
38-
output += ",";
40+
enumTagText += ",";
3941
}
42+
43+
if (!UnrealConfig.SuppressComments)
44+
{
45+
enumTagText = enumTagText.PadRight(32, ' ');
46+
enumTagText += $"// {index}";
47+
}
48+
49+
output += "\r\n" + UDecompilingState.Tabs + enumTagText;
4050
}
4151

4252
UDecompilingState.RemoveTabs(1);
53+
4354
return output;
4455
}
4556
}
4657
}
47-
#endif
58+
#endif

0 commit comments

Comments
 (0)