diff --git a/RecrownedAthenaeum.ConsoleTools/CommandProcessor/HelpCommand.cs b/RecrownedAthenaeum.ConsoleTools/CommandProcessor/HelpCommand.cs index 4797ced..74e11f0 100644 --- a/RecrownedAthenaeum.ConsoleTools/CommandProcessor/HelpCommand.cs +++ b/RecrownedAthenaeum.ConsoleTools/CommandProcessor/HelpCommand.cs @@ -15,7 +15,7 @@ namespace RecrownedAthenaeum.Tools.CommandProcessor public override string Help(string argument) { - return "Prints this."; + return "help [command] [arg]"; } @@ -26,11 +26,17 @@ namespace RecrownedAthenaeum.Tools.CommandProcessor if (commandEngine.ContainsCommand(arguments[0])) { ConsoleUtilities.WriteWrappedLine(commandEngine.GetCommand(arguments[0]).Help(null)); - } else + for (int i = 1; i < arguments.Length; i++) + { + ConsoleUtilities.WriteWrappedLine(commandEngine.GetCommand(arguments[0]).Help(arguments[i])); + } + } + else { throw new ArgumentException(arguments[0] + " not a command. Type \"help\" for a list of commands."); } - } else + } + else { ConsoleUtilities.WriteWrappedLine("Tools for RecrownedAthenaeum library. Possible commands are as follows:\n"); foreach (EngineCommand engineCommand in commandEngine.commands) diff --git a/RecrownedAthenaeum.ConsoleTools/TextureAtlasTools/TexturePackerCommand.cs b/RecrownedAthenaeum.ConsoleTools/TextureAtlasTools/TexturePackerCommand.cs index 702f378..50f238c 100644 --- a/RecrownedAthenaeum.ConsoleTools/TextureAtlasTools/TexturePackerCommand.cs +++ b/RecrownedAthenaeum.ConsoleTools/TextureAtlasTools/TexturePackerCommand.cs @@ -15,10 +15,19 @@ namespace RecrownedAthenaeum.Tools.TextureAtlasTools public override string Help(string argument) { - return "Packs a given directory composed of png and jpg files into an atlas. Can also add 9patch properties.\n" + - "-i path for input directory containing the textures. Required.\n\n" + - "-o path for output files. Points to non-existent file. Will create texture and definitions file with name. Required.\n\n" + - "-9p can be used multiple times for defining a 9patch. This parameter requires a name, left patch, right patch, top patch, and bottom patch in the format name,a,b,c,d. Optional."; + switch (argument) + { + case null: + return "Packs a given directory composed of png and jpg files into an atlas. Can also add 9patch properties. Possible arguments are \"-i\", \"-o\", and \"-9p\". Refer to \"help\" for more info."; + case "-i": + return "-i : path for input directory containing the textures. Required."; + case "-o": + return "-o : path for output files. Points to non-existent file. Will create texture and definitions file with name. Required."; + case "-9p": + return "-9p can be used multiple times for defining a 9patch. This parameter requires a name, left patch, right patch, top patch, and bottom patch in the format name,a,b,c,d. Optional."; + default: + return argument + " is not a valid argument. Type \"help texturepacker to see general help and list of arguments.\""; + } } public override void Run(string[] arguments)