diff --git a/hecl/driver/ToolBase.hpp b/hecl/driver/ToolBase.hpp index 3fc8b545c..412893994 100644 --- a/hecl/driver/ToolBase.hpp +++ b/hecl/driver/ToolBase.hpp @@ -30,6 +30,7 @@ struct ToolPassInfo unsigned verbosityLevel = 0; bool force = false; bool yes = false; + bool gui = false; }; #define RED "\033[0;31m" @@ -93,6 +94,7 @@ public: : m_info(info) { hecl::VerbosityLevel = info.verbosityLevel; + hecl::GuiMode = info.gui; } virtual ~ToolBase() {} virtual hecl::SystemString toolName() const=0; @@ -169,7 +171,7 @@ private: public: HelpOutput(HelpFunc helpFunc) - : m_sout(NULL), m_helpFunc(helpFunc), m_lineWidth(hecl::ConsoleWidth()) + : m_sout(NULL), m_helpFunc(helpFunc), m_lineWidth(hecl::GuiMode ? 120 : hecl::ConsoleWidth()) {} void go() @@ -286,7 +288,7 @@ void ToolPrintProgress(const hecl::SystemChar* message, const hecl::SystemChar* else hecl::Printf(_S(" ")); - int width = std::max(80, hecl::ConsoleWidth()); + int width = (hecl::GuiMode ? 120 : std::max(80, hecl::ConsoleWidth())); int half; if (blocks) half = width / 2 - 2; diff --git a/hecl/driver/main.cpp b/hecl/driver/main.cpp index 2a8a97af8..512c9ff92 100644 --- a/hecl/driver/main.cpp +++ b/hecl/driver/main.cpp @@ -213,6 +213,8 @@ int main(int argc, const char** argv) info.force = true; else if (*chit == _S('y')) info.yes = true; + else if (*chit == _S('g')) + info.gui = true; else info.flags.push_back(*chit); } diff --git a/hecl/extern/boo b/hecl/extern/boo index f71131e4d..beb7f00b1 160000 --- a/hecl/extern/boo +++ b/hecl/extern/boo @@ -1 +1 @@ -Subproject commit f71131e4df6af467d5ed0ad0cd5edd869eba2095 +Subproject commit beb7f00b182f34e12607e70e9184c0d8dd7d1c1f diff --git a/hecl/include/hecl/hecl.hpp b/hecl/include/hecl/hecl.hpp index 2a577d32b..f6272dd91 100644 --- a/hecl/include/hecl/hecl.hpp +++ b/hecl/include/hecl/hecl.hpp @@ -47,6 +47,7 @@ struct DataSpecEntry; } extern unsigned VerbosityLevel; +extern bool GuiMode; extern logvisor::Module LogModule; std::string WideToUTF8(std::wstring_view src); diff --git a/hecl/lib/hecl.cpp b/hecl/lib/hecl.cpp index 6b321ffbd..ed82ff504 100644 --- a/hecl/lib/hecl.cpp +++ b/hecl/lib/hecl.cpp @@ -23,6 +23,7 @@ namespace hecl { unsigned VerbosityLevel = 0; +bool GuiMode = false; logvisor::Module LogModule("hecl"); static const std::string Illegals {"<>?\"|"};