makes sure input is specified before checking other arguments now.
This commit is contained in:
parent
f442be1ba6
commit
58c3085f90
@ -41,6 +41,8 @@ namespace RecrownedAthenaeum.Tools.TextureAtlasTools
|
|||||||
texturePacker = new TexturePacker((arguments[i + 1]));
|
texturePacker = new TexturePacker((arguments[i + 1]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (texturePacker != null)
|
||||||
|
{
|
||||||
texturePacker.Build();
|
texturePacker.Build();
|
||||||
|
|
||||||
for (int i = 0; i < arguments.Length; i++)
|
for (int i = 0; i < arguments.Length; i++)
|
||||||
@ -52,7 +54,8 @@ namespace RecrownedAthenaeum.Tools.TextureAtlasTools
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
texturePacker.SetNinePatch(nPatchArgs[0], int.Parse(nPatchArgs[1]), int.Parse(nPatchArgs[2]), int.Parse(nPatchArgs[3]), int.Parse(nPatchArgs[4]));
|
texturePacker.SetNinePatch(nPatchArgs[0], int.Parse(nPatchArgs[1]), int.Parse(nPatchArgs[2]), int.Parse(nPatchArgs[3]), int.Parse(nPatchArgs[4]));
|
||||||
} catch (FormatException)
|
}
|
||||||
|
catch (FormatException)
|
||||||
{
|
{
|
||||||
throw new ArgumentException("-9p argument parameters must be in the format \"-9p textureName,a,b,c,d\" where a, b, c, and d are integers definining the border regions for the 9patch.");
|
throw new ArgumentException("-9p argument parameters must be in the format \"-9p textureName,a,b,c,d\" where a, b, c, and d are integers definining the border regions for the 9patch.");
|
||||||
}
|
}
|
||||||
@ -73,6 +76,10 @@ namespace RecrownedAthenaeum.Tools.TextureAtlasTools
|
|||||||
throw new ArgumentException("no -o argument found to specify output.");
|
throw new ArgumentException("no -o argument found to specify output.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
throw new ArgumentException("-i not specified.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user