void CChat::Output ( const char* szText, bool bColorCoded ) { CChatLine* pLine = NULL; const char* szRemainingText = szText; CColor color = m_TextColor; do { m_uiMostRecentLine = (m_uiMostRecentLine == 0 ? CHAT_MAX_LINES - 1 : m_uiMostRecentLine - 1); m_fSmoothScroll -= 1.0f; pLine = &m_Lines [ m_uiMostRecentLine ]; szRemainingText = pLine->Format ( szRemainingText, ( m_vecBackgroundSize.fX - ( 10.0f * m_vecScale.fX ) ), color, bColorCoded ); pLine->SetActive ( true ); pLine->UpdateCreationTime (); } while ( szRemainingText ); }
void CChat::Output(const char* szText, bool bColorCoded) { CChatLine* pLine = NULL; const char* szRemainingText = szText; CColor color = m_TextColor; // Allow smooth scroll when text is added if game FX Quality is not low CGameSettings* gameSettings = CCore::GetSingleton().GetGame()->GetSettings(); if (gameSettings->GetFXQuality() > 0) m_fSmoothScroll -= 1.0f; do { m_uiMostRecentLine = (m_uiMostRecentLine == 0 ? CHAT_MAX_LINES - 1 : m_uiMostRecentLine - 1); pLine = &m_Lines[m_uiMostRecentLine]; szRemainingText = pLine->Format(szRemainingText, (m_vecBackgroundSize.fX - (10.0f * m_vecScale.fX)), color, bColorCoded); pLine->SetActive(true); pLine->UpdateCreationTime(); } while (szRemainingText); }