예제 #1
0
void CConsole::PrintConsole(const tstring& sText)
{
	if (sText.startswith("[color=FF0000]") && sText.endswith("[/color]\n"))
		DebugPrint(sText.substr(14, sText.length()-14-9).c_str());
	else
		DebugPrint(sText.c_str());

	m_hOutput->AppendText(sText);

	if (m_hOutput->GetText().length() > 2500)
		m_hOutput->SetText(m_hOutput->GetText().substr(500));

	if (!CApplication::Get()->IsOpen())
		return;

	if (IsVisible())
		Layout();
}
예제 #2
0
void CApplication::PrintError(const tstring& sText)
{
	tstring sTrimmedText = trim(sText);

	GetConsole()->PrintConsole(tstring("[color=FF0000]ERROR: ") + sTrimmedText + "[/color]" + (sText.endswith("\n")?"\n":""));
}