MCPcopy Create free account
hub / github.com/ddnet/ddnet / RenderLine

Method RenderLine

src/game/client/components/nameplates.cpp:486–503  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

484 bool m_InGame = false;
485 PartsVector m_vpParts;
486 void RenderLine(CGameClient &This,
487 vec2 Pos, vec2 Size,
488 PartsVector::iterator Start, PartsVector::iterator End)
489 {
490 Pos.x -= Size.x / 2.0f;
491 for(auto PartIt = Start; PartIt != End; ++PartIt)
492 {
493 const CNamePlatePart &Part = **PartIt;
494 if(Part.Visible())
495 {
496 Part.Render(This, vec2(
497 Pos.x + (Part.Padding().x + Part.Size().x) / 2.0f,
498 Pos.y - std::max(Size.y, Part.Padding().y + Part.Size().y) / 2.0f));
499 }
500 if(Part.Visible() || Part.ShiftOnInvis())
501 Pos.x += Part.Size().x + Part.Padding().x;
502 }
503 }
504 template<typename PartType, typename... ArgsType>
505 void AddPart(CGameClient &This, ArgsType &&...Args)
506 {

Callers

nothing calls this directly

Calls 5

VisibleMethod · 0.80
PaddingMethod · 0.80
ShiftOnInvisMethod · 0.80
RenderMethod · 0.45
SizeMethod · 0.45

Tested by

no test coverage detected