mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 15:44:56 +00:00
Update boo; Add initial GUI mode support
This commit is contained in:
@@ -30,6 +30,7 @@ struct ToolPassInfo
|
|||||||
unsigned verbosityLevel = 0;
|
unsigned verbosityLevel = 0;
|
||||||
bool force = false;
|
bool force = false;
|
||||||
bool yes = false;
|
bool yes = false;
|
||||||
|
bool gui = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define RED "\033[0;31m"
|
#define RED "\033[0;31m"
|
||||||
@@ -93,6 +94,7 @@ public:
|
|||||||
: m_info(info)
|
: m_info(info)
|
||||||
{
|
{
|
||||||
hecl::VerbosityLevel = info.verbosityLevel;
|
hecl::VerbosityLevel = info.verbosityLevel;
|
||||||
|
hecl::GuiMode = info.gui;
|
||||||
}
|
}
|
||||||
virtual ~ToolBase() {}
|
virtual ~ToolBase() {}
|
||||||
virtual hecl::SystemString toolName() const=0;
|
virtual hecl::SystemString toolName() const=0;
|
||||||
@@ -169,7 +171,7 @@ private:
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
HelpOutput(HelpFunc helpFunc)
|
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()
|
void go()
|
||||||
@@ -286,7 +288,7 @@ void ToolPrintProgress(const hecl::SystemChar* message, const hecl::SystemChar*
|
|||||||
else
|
else
|
||||||
hecl::Printf(_S(" "));
|
hecl::Printf(_S(" "));
|
||||||
|
|
||||||
int width = std::max(80, hecl::ConsoleWidth());
|
int width = (hecl::GuiMode ? 120 : std::max(80, hecl::ConsoleWidth()));
|
||||||
int half;
|
int half;
|
||||||
if (blocks)
|
if (blocks)
|
||||||
half = width / 2 - 2;
|
half = width / 2 - 2;
|
||||||
|
|||||||
@@ -213,6 +213,8 @@ int main(int argc, const char** argv)
|
|||||||
info.force = true;
|
info.force = true;
|
||||||
else if (*chit == _S('y'))
|
else if (*chit == _S('y'))
|
||||||
info.yes = true;
|
info.yes = true;
|
||||||
|
else if (*chit == _S('g'))
|
||||||
|
info.gui = true;
|
||||||
else
|
else
|
||||||
info.flags.push_back(*chit);
|
info.flags.push_back(*chit);
|
||||||
}
|
}
|
||||||
|
|||||||
2
hecl/extern/boo
vendored
2
hecl/extern/boo
vendored
Submodule hecl/extern/boo updated: f71131e4df...beb7f00b18
@@ -47,6 +47,7 @@ struct DataSpecEntry;
|
|||||||
}
|
}
|
||||||
|
|
||||||
extern unsigned VerbosityLevel;
|
extern unsigned VerbosityLevel;
|
||||||
|
extern bool GuiMode;
|
||||||
extern logvisor::Module LogModule;
|
extern logvisor::Module LogModule;
|
||||||
|
|
||||||
std::string WideToUTF8(std::wstring_view src);
|
std::string WideToUTF8(std::wstring_view src);
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
namespace hecl
|
namespace hecl
|
||||||
{
|
{
|
||||||
unsigned VerbosityLevel = 0;
|
unsigned VerbosityLevel = 0;
|
||||||
|
bool GuiMode = false;
|
||||||
logvisor::Module LogModule("hecl");
|
logvisor::Module LogModule("hecl");
|
||||||
static const std::string Illegals {"<>?\"|"};
|
static const std::string Illegals {"<>?\"|"};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user