removed extension for region names + refactor
This commit is contained in:
@@ -134,7 +134,7 @@ namespace RecrownedAthenaeum.Tools.TextureAtlas
|
||||
ImageHandler ih = imageHandlers[i];
|
||||
regions[i].SetBounds(ih.x, ih.y, ih.Width, ih.Height);
|
||||
regions[i].ninePatchData = ih.ninePatchData;
|
||||
regions[i].name = ih.Name;
|
||||
regions[i].name = Path.GetFileNameWithoutExtension(ih.Name);
|
||||
using (Image<Rgba32> image = Image.Load<Rgba32>(ih.path))
|
||||
{
|
||||
atlasTexture.Mutate(img => img.DrawImage(gOptions, image, new Point(ih.x, ih.y)));
|
||||
|
@@ -65,20 +65,20 @@ namespace RecrownedAthenaeum.Tools.TextureAtlasTools
|
||||
}
|
||||
else
|
||||
{
|
||||
int indexOfInputArg = IndexOfArgumentIn("-i", arguments);
|
||||
int indexOfInputArg = IndexOfArgument("-i", arguments);
|
||||
if (indexOfInputArg + 1 >= arguments.Length) throw new ArgumentException("-i is not followed by input path.");
|
||||
path = arguments[1 + IndexOfArgumentIn("-i", arguments)];
|
||||
path = arguments[1 + IndexOfArgument("-i", arguments)];
|
||||
if (HasArgument("-mp", arguments))
|
||||
{
|
||||
int.TryParse(arguments[IndexOfArgumentIn("-mp", arguments) + 1], out mp);
|
||||
int.TryParse(arguments[IndexOfArgument("-mp", arguments) + 1], out mp);
|
||||
}
|
||||
if (HasArgument("-sp", arguments))
|
||||
{
|
||||
int.TryParse(arguments[IndexOfArgumentIn("-sp", arguments) + 1], out sp);
|
||||
int.TryParse(arguments[IndexOfArgument("-sp", arguments) + 1], out sp);
|
||||
}
|
||||
int indexOfOutputArg = IndexOfArgumentIn("-o", arguments);
|
||||
int indexOfOutputArg = IndexOfArgument("-o", arguments);
|
||||
if (indexOfOutputArg + 1 >= arguments.Length) throw new ArgumentException("-o is not followed by input path.");
|
||||
output = arguments[IndexOfArgumentIn("-o", arguments) + 1];
|
||||
output = arguments[IndexOfArgument("-o", arguments) + 1];
|
||||
if (HasArgument("-dau", arguments)) dau = true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user