Updated Tools accordingly to new pipeline structure.

This commit is contained in:
2020-02-23 14:50:01 -05:00
parent 17e0a2fb21
commit c4dd6f035d
4 changed files with 86 additions and 17 deletions

View File

@@ -1,5 +1,5 @@
using Newtonsoft.Json;
using RecrownedGTK.Data;
using RecrownedGTK.Pipeline.Information;
using RecrownedGTK.Tools.CommandProcessor;
using System;
using System.IO;
@@ -45,7 +45,7 @@ namespace RecrownedGTK.Tools.NinePatchTools
if (IndexOfArgument("-t", arguments) + 1 >= arguments.Length || !int.TryParse(arguments[IndexOfArgument("-t", arguments) + 1], out topBound)) throw new ArgumentException("Missing -u argument bound.");
if (IndexOfArgument("-b", arguments) + 1 >= arguments.Length || !int.TryParse(arguments[IndexOfArgument("-b", arguments) + 1], out bottomBound)) throw new ArgumentException("Missing -d argument bound.");
NinePatchData npData = new NinePatchData(Path.GetFileName(imagePath), leftBound, rightBound, bottomBound, topBound);
NinePatchInfo npData = new NinePatchInfo(Path.GetFileName(imagePath), leftBound, rightBound, bottomBound, topBound);
string serialized = JsonConvert.SerializeObject(npData, Formatting.Indented);
string modifiedPath = Directory.GetParent(imagePath) + Path.PathSeparator.ToString() + Path.GetFileNameWithoutExtension(imagePath) + "-texture" + Path.GetExtension(imagePath);
File.Move(imagePath, modifiedPath);