@@ -11,7 +11,7 @@ namespace Lumina.Data.Parsing.Uld
11
11
/// </summary>
12
12
public static class UldRoot
13
13
{
14
- public enum AlignmentType
14
+ public enum AlignmentType : byte
15
15
{
16
16
TopLeft = 0x0 ,
17
17
Top = 0x1 ,
@@ -119,18 +119,24 @@ public struct TextureEntry
119
119
{
120
120
public uint Id ;
121
121
public char [ ] Path ; // 44? wtf?
122
+ public uint IconId ;
123
+ public byte ThemeSupportBitmask ; // Only used when WidgetData.AssetsHaveThemeSupport is true. Example: 4 (0b100) means it's only available in fourth/, while 7 (0b111) means it's available in light/, third/ and fourth/
122
124
123
- //unk2 seems to always be 1
124
- public uint Unk1 ;
125
- public uint Unk2 ;
126
-
127
- public static TextureEntry Read ( LuminaBinaryReader br , char minorVersion )
125
+ public static TextureEntry Read ( LuminaBinaryReader br , uint version )
128
126
{
129
127
TextureEntry ret = new TextureEntry ( ) ;
130
128
ret . Id = br . ReadUInt32 ( ) ;
131
129
ret . Path = br . ReadChars ( 44 ) ;
132
- ret . Unk1 = br . ReadUInt32 ( ) ;
133
- ret . Unk2 = minorVersion == '1' ? br . ReadUInt32 ( ) : 0 ;
130
+ ret . IconId = br . ReadUInt32 ( ) ;
131
+ if ( version >= 100 )
132
+ {
133
+ ret . ThemeSupportBitmask = br . ReadByte ( ) ;
134
+ br . BaseStream . Position += 3 ;
135
+ }
136
+ else
137
+ {
138
+ ret . ThemeSupportBitmask = 0 ;
139
+ }
134
140
return ret ;
135
141
}
136
142
}
@@ -611,6 +617,7 @@ public struct WidgetData
611
617
{
612
618
public uint Id ;
613
619
public AlignmentType AlignmentType ;
620
+ public bool AssetsHaveThemeSupport ;
614
621
public short X ;
615
622
public short Y ;
616
623
public ushort NodeCount ;
@@ -622,7 +629,9 @@ public static WidgetData Read( LuminaBinaryReader br, ComponentData[] definedCom
622
629
{
623
630
WidgetData ret = new WidgetData ( ) ;
624
631
ret . Id = br . ReadUInt32 ( ) ;
625
- ret . AlignmentType = ( AlignmentType ) br . ReadInt32 ( ) ;
632
+ ret . AlignmentType = ( AlignmentType ) br . ReadByte ( ) ;
633
+ ret . AssetsHaveThemeSupport = br . ReadBoolean ( ) ;
634
+ br . BaseStream . Position += 2 ;
626
635
ret . X = br . ReadInt16 ( ) ;
627
636
ret . Y = br . ReadInt16 ( ) ;
628
637
ret . NodeCount = br . ReadUInt16 ( ) ;
0 commit comments