@@ -77,6 +77,10 @@ public class XivUi : IItem
77
77
/// </summary>
78
78
public int IconNumber { get ; set ; }
79
79
80
+ /// <summary>
81
+ /// Whether or not this file has a hi-res equivalent
82
+ /// </summary>
83
+ public bool HasHiRes { get ; private set ; }
80
84
81
85
/// <summary>
82
86
/// Gets the item's name as it should be written to the modlist/modpack files.
@@ -119,9 +123,12 @@ public override int GetHashCode()
119
123
return this . Name . GetHashCode ( ) ^ this . IconNumber . GetHashCode ( ) ;
120
124
}
121
125
126
+ private const string HiResUiExt = "_hr1" ;
122
127
123
- public async Task < Dictionary < string , string > > GetTexPaths ( )
128
+ public async Task < Dictionary < string , string > > GetTexPaths ( bool addLowRes , bool addHiRes )
124
129
{
130
+ var resPaths = new Dictionary < string , string > ( ) ;
131
+
125
132
if ( SecondaryCategory == XivStrings . Maps )
126
133
{
127
134
var _tex = new Tex ( XivCache . GameInfo . GameDirectory ) ;
@@ -131,14 +138,29 @@ public async Task<Dictionary<string, string>> GetTexPaths()
131
138
} else if ( SecondaryCategory == XivStrings . HUD )
132
139
{
133
140
//ui/uld/aozactionlearned.tex
134
- return new Dictionary < string , string > ( ) { { Name , "ui/uld/" + Name . ToLower ( ) + ".tex" } } ;
141
+ HasHiRes = true ;
142
+
143
+ if ( addLowRes )
144
+ resPaths . Add ( Name , "ui/uld/" + Name . ToLower ( ) + ".tex" ) ;
145
+
146
+ if ( addHiRes )
147
+ resPaths . Add ( Name , "ui/uld/" + Name . ToLower ( ) + HiResUiExt + ".tex" ) ;
135
148
}
136
149
else
137
150
{
151
+ HasHiRes = true ;
152
+
138
153
var block = ( ( IconNumber / 1000 ) * 1000 ) . ToString ( ) . PadLeft ( 6 , '0' ) ;
139
154
var icon = IconNumber . ToString ( ) . PadLeft ( 6 , '0' ) ;
140
- return new Dictionary < string , string > ( ) { { Name , "ui/icon/" + block + '/' + icon + ".tex" } } ;
155
+
156
+ if ( addLowRes )
157
+ resPaths . Add ( Name , "ui/icon/" + block + '/' + icon + ".tex" ) ;
158
+
159
+ if ( addHiRes )
160
+ resPaths . Add ( Name , "ui/icon/" + block + '/' + icon + HiResUiExt + ".tex" ) ;
141
161
}
162
+
163
+ return resPaths ;
142
164
}
143
165
}
144
166
}
0 commit comments