void CUISpeechMenu::InitList(LPCSTR section_name) { R_ASSERT2(pSettings->section_exist(section_name), section_name); CUITextWnd* pItem = NULL; string64 phrase; string256 str; for (int i = 0; true; ++i) { xr_sprintf (phrase,"phrase_%i",i); if (pSettings->line_exist(section_name, phrase)) { LPCSTR s = pSettings->r_string(section_name, phrase); _GetItem (s,0,phrase); xr_sprintf (str, "%d. %s",i+1, CStringTable().translate(phrase).c_str()); ADD_TEXT_TO_VIEW3 (str, pItem, m_pList); pItem->SetFont (m_pFont); pItem->SetTextColor (m_text_color); } else break; } }
CUIStatic* CUIGameLog::AddLogMessage(LPCSTR msg) { CUIStatic* pItem = NULL; ADD_TEXT_TO_VIEW3 (msg, pItem, this); pItem->SetTextComplexMode (true); pItem->SetFont (GetFont()); pItem->SetTextColor (txt_color); pItem->SetClrAnimDelay (5000.0f); pItem->SetClrLightAnim (CHAT_LOG_ITEMS_ANIMATION, false, true, true, true); ForceUpdate (); return pItem; }