Skip to content

Commit 6552787

Browse files
committed
Update v2.3.5.7
2 parents 8528f8d + eb39ee7 commit 6552787

File tree

1 file changed

+30
-9
lines changed
  • xivModdingFramework/Items/DataContainers

1 file changed

+30
-9
lines changed

xivModdingFramework/Items/DataContainers/XivUi.cs

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,15 @@ public override int GetHashCode()
125125

126126
private const string HiResUiExt = "_hr1";
127127

128-
public async Task<Dictionary<string, string>> GetTexPaths(bool addLowRes, bool addHiRes)
128+
/// <summary>
129+
/// Retrieve texture paths.
130+
/// If both low and high res are false, low res is still returned.
131+
/// Maps only have a single resolution.
132+
/// </summary>
133+
/// <param name="addLowRes"></param>
134+
/// <param name="addHiRes"></param>
135+
/// <returns></returns>
136+
public async Task<Dictionary<string, string>> GetTexPaths(bool addLowRes = true, bool addHiRes = false)
129137
{
130138
var resPaths = new Dictionary<string, string>();
131139

@@ -140,11 +148,17 @@ public async Task<Dictionary<string, string>> GetTexPaths(bool addLowRes, bool a
140148
//ui/uld/aozactionlearned.tex
141149
HasHiRes = true;
142150

143-
if (addLowRes)
144-
resPaths.Add(Name, "ui/uld/" + Name.ToLower() + ".tex");
145-
146-
if (addHiRes)
151+
if (addHiRes && !addLowRes)
152+
{
147153
resPaths.Add(Name, "ui/uld/" + Name.ToLower() + HiResUiExt + ".tex");
154+
} else if(addHiRes && addLowRes)
155+
{
156+
resPaths.Add(Name + "SD", "ui/uld/" + Name.ToLower() + ".tex");
157+
resPaths.Add(Name + "HD", "ui/uld/" + Name.ToLower() + HiResUiExt + ".tex");
158+
} else
159+
{
160+
resPaths.Add(Name, "ui/uld/" + Name.ToLower() + ".tex");
161+
}
148162
}
149163
else
150164
{
@@ -153,11 +167,18 @@ public async Task<Dictionary<string, string>> GetTexPaths(bool addLowRes, bool a
153167
var block = ((IconNumber / 1000) * 1000).ToString().PadLeft(6,'0');
154168
var icon = IconNumber.ToString().PadLeft(6, '0');
155169

156-
if (addLowRes)
157-
resPaths.Add(Name, "ui/icon/" + block + '/' + icon + ".tex");
158-
159-
if (addHiRes)
170+
if (addHiRes && !addLowRes)
171+
{
160172
resPaths.Add(Name, "ui/icon/" + block + '/' + icon + HiResUiExt + ".tex");
173+
}
174+
else if (addHiRes && addLowRes)
175+
{
176+
resPaths.Add(Name + "SD", "ui/icon/" + block + '/' + icon + ".tex");
177+
resPaths.Add(Name + "HD", "ui/icon/" + block + '/' + icon + HiResUiExt + ".tex");
178+
} else
179+
{
180+
resPaths.Add(Name, "ui/icon/" + block + '/' + icon + ".tex");
181+
}
161182
}
162183

163184
return resPaths;

0 commit comments

Comments
 (0)