예제 #1
0
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 );
}
예제 #2
0
파일: CChat.cpp 프로젝트: ccw808/mtasa-blue
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);
}