MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / AUTO_STATIC_ARRAY

Function AUTO_STATIC_ARRAY

engine/Poseidon/Game/Chat.cpp:333–368  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

331 const SpeakingIndication& item = _speaking[i];
332 const float textWidth = GEngine->GetTextWidth(_size, _font, item.name);
333 const float cellWidth = textWidth + 2.0f * border;
334 if (cellWidth > lineWidth)
335 {
336 break;
337 }
338
339 GEngine->Draw2D(mip, _bgColor, Rect2DPixel((left - border) * w, top * h, cellWidth * w, _h * h));
340 GEngine->DrawText(Point2DFloat(left, top), _size, Rect2DFloat(left - border, top, cellWidth, _h), _font,
341 _colors[item.channel], item.name);
342 left += cellWidth + space;
343 lineWidth -= cellWidth + space;
344 }
345
346 row--;
347 if (row < 0)
348 {
349 return;
350 }
351 top -= _h;
352 }
353
354 int n = Size();
355 if (n == 0)
356 {
357 return;
358 }
359 int begin = _offset;
360 saturate(begin, 0, n - 1);
361 for (int i = begin; i < n; i++)
362 {
363 const ChatItem& item = Get(i);
364 if (item.text.GetLength() == 0)
365 {
366 continue;
367 }
368 if (!_enable && !item.forceDisplay)
369 {
370 continue;
371 }

Callers 1

QSortSeqMethod · 0.50

Calls 4

CopyTextElementFunction · 0.85
GetLangIDMethod · 0.80
GetTextWidthMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected