2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-11-30 16:27:47 +00:00

feat: add command line option to disable color output

This commit is contained in:
Jan Laupetin
2025-09-11 22:39:15 +02:00
parent d693ace12f
commit c28357a19f
5 changed files with 50 additions and 0 deletions

View File

@@ -29,6 +29,12 @@ const CommandLineOption* const OPTION_VERBOSE =
.WithDescription("Outputs a lot more and more detailed messages.")
.Build();
const CommandLineOption* const OPTION_NO_COLOR =
CommandLineOption::Builder::Create()
.WithLongName("no-color")
.WithDescription("Disables colored terminal output.")
.Build();
constexpr auto CATEGORY_GAME = "Game";
const CommandLineOption* const OPTION_GAME_IW3 =
@@ -71,6 +77,7 @@ const CommandLineOption* const COMMAND_LINE_OPTIONS[]{
OPTION_HELP,
OPTION_VERSION,
OPTION_VERBOSE,
OPTION_NO_COLOR,
OPTION_GAME_IW3,
OPTION_GAME_IW4,
OPTION_GAME_IW5,
@@ -143,5 +150,8 @@ bool ImageConverterArgs::ParseArgs(const int argc, const char** argv, bool& shou
else
con::globalLogLevel = con::LogLevel::INFO;
// --no-color
con::globalUseColor = !m_argument_parser.IsOptionSpecified(OPTION_NO_COLOR);
return true;
}