mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 14:27:42 +00:00
windows ANSI console support
This commit is contained in:
@@ -159,38 +159,26 @@ public:
|
||||
|
||||
void printBold(const HECL::SystemChar* str)
|
||||
{
|
||||
#if _WIN32
|
||||
HECL::FPrintf(m_sout, _S("%s"), str);
|
||||
#else
|
||||
if (XTERM_COLOR)
|
||||
HECL::FPrintf(m_sout, _S("" BOLD "%s" NORMAL ""), str);
|
||||
else
|
||||
HECL::FPrintf(m_sout, _S("%s"), str);
|
||||
#endif
|
||||
}
|
||||
|
||||
void secHead(const HECL::SystemChar* headName)
|
||||
{
|
||||
#if _WIN32
|
||||
HECL::FPrintf(m_sout, _S("%s\n"), headName);
|
||||
#else
|
||||
if (XTERM_COLOR)
|
||||
HECL::FPrintf(m_sout, _S("" BOLD "%s" NORMAL "\n"), headName);
|
||||
else
|
||||
HECL::FPrintf(m_sout, _S("%s\n"), headName);
|
||||
#endif
|
||||
}
|
||||
|
||||
void optionHead(const HECL::SystemChar* flag, const HECL::SystemChar* synopsis)
|
||||
{
|
||||
#if _WIN32
|
||||
HECL::FPrintf(m_sout, _S("%s (%s)\n"), flag, synopsis);
|
||||
#else
|
||||
if (XTERM_COLOR)
|
||||
HECL::FPrintf(m_sout, _S("" BOLD "%s" NORMAL " (%s)\n"), flag, synopsis);
|
||||
else
|
||||
HECL::FPrintf(m_sout, _S("%s (%s)\n"), flag, synopsis);
|
||||
#endif
|
||||
}
|
||||
|
||||
void beginWrap()
|
||||
@@ -205,15 +193,11 @@ public:
|
||||
|
||||
void wrapBold(const HECL::SystemChar* str)
|
||||
{
|
||||
#if _WIN32
|
||||
m_wrapBuffer += str;
|
||||
#else
|
||||
if (XTERM_COLOR)
|
||||
m_wrapBuffer += _S("" BOLD "");
|
||||
m_wrapBuffer += str;
|
||||
if (XTERM_COLOR)
|
||||
m_wrapBuffer += _S("" NORMAL "");
|
||||
#endif
|
||||
}
|
||||
|
||||
void endWrap()
|
||||
|
||||
Reference in New Issue
Block a user