| 43 | //////////////////////////////////////////////////////////////////////////////// |
| 44 | |
| 45 | void CUITextBanner::Out(float x, float y, const char* fmt, ...) |
| 46 | { |
| 47 | if (!fmt) |
| 48 | return; |
| 49 | |
| 50 | StyleParams_it it = m_StyleParams.begin(); |
| 51 | |
| 52 | // Применяем эффекты |
| 53 | for (; it != m_StyleParams.end(); ++it) |
| 54 | { |
| 55 | // Fade effect |
| 56 | if (it->first & tbsFade) |
| 57 | { |
| 58 | EffectFade(); |
| 59 | } |
| 60 | // Flicker effect |
| 61 | if (it->first & tbsFlicker) |
| 62 | { |
| 63 | EffectFlicker(); |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | va_list Print; |
| 68 | string256 msg; |
| 69 | xr_string buf; |
| 70 | |
| 71 | va_start(Print, fmt); |
| 72 | vsprintf(msg, fmt, Print); |
| 73 | buf += msg; |
| 74 | va_end(Print); |
| 75 | |
| 76 | R_ASSERT(m_pFont); |
| 77 | m_pFont->SetColor(m_Cl); |
| 78 | m_pFont->SetAligment(aligment); |
| 79 | // if(fontSize>0.0f) |
| 80 | // m_pFont->SetHeight(fontSize); |
| 81 | |
| 82 | Fvector2 pos; |
| 83 | UI()->ClientToScreenScaled(pos, x, y); |
| 84 | m_pFont->Out(pos.x, pos.y, "%s", buf.c_str()); |
| 85 | } |
| 86 | |
| 87 | //////////////////////////////////////////////////////////////////////////////// |
| 88 |
no test coverage detected