MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / Out

Method Out

ogsr_engine/xrGame/ui/UITextBanner.cpp:45–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43////////////////////////////////////////////////////////////////////////////////
44
45void 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

Callers 8

RenderUIMethod · 0.45
RenderMethod · 0.45
PickupInfoDrawMethod · 0.45
DrawMethod · 0.45
draw_rectFunction · 0.45
DrawMethod · 0.45
DrawMethod · 0.45
DrawCursorMethod · 0.45

Calls 6

UIFunction · 0.85
ClientToScreenScaledMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
SetColorMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected