DDraceNetwork Docs
nameplates.h
Go to the documentation of this file.
1/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
2/* If you are missing that file, acquire a complete release at teeworlds.com. */
3#ifndef GAME_CLIENT_COMPONENTS_NAMEPLATES_H
4#define GAME_CLIENT_COMPONENTS_NAMEPLATES_H
5#include <base/vmath.h>
6
8#include <engine/textrender.h>
9
11
14
16{
18 {
19 Reset();
20 }
21
22 void Reset()
23 {
26 m_aName[0] = '\0';
27 m_aClan[0] = '\0';
29 }
30
34
38};
39
40class CNamePlates : public CComponent
41{
42 void RenderNameplate(vec2 Position, const CNetObj_PlayerInfo *pPlayerInfo, float Alpha, bool ForceAlpha);
43
45
46 void ResetNamePlates();
47
49
50public:
51 virtual int Sizeof() const override { return sizeof(*this); }
52 virtual void OnWindowResize() override;
53 virtual void OnInit() override;
54 virtual void OnRender() override;
55};
56
57#endif
Definition: component.h:20
Definition: nameplates.h:41
virtual void OnInit() override
Definition: nameplates.cpp:346
int m_DirectionQuadContainerIndex
Definition: nameplates.h:48
virtual void OnWindowResize() override
Definition: nameplates.cpp:341
void ResetNamePlates()
Definition: nameplates.cpp:330
virtual int Sizeof() const override
Definition: nameplates.h:51
virtual void OnRender() override
Definition: nameplates.cpp:274
void RenderNameplate(vec2 Position, const CNetObj_PlayerInfo *pPlayerInfo, float Alpha, bool ForceAlpha)
Definition: nameplates.cpp:17
SPlayerNamePlate m_aNamePlates[MAX_CLIENTS]
Definition: nameplates.h:44
@ MAX_CLAN_LENGTH
Definition: protocol.h:98
@ MAX_CLIENTS
Definition: protocol.h:88
@ MAX_NAME_LENGTH
Definition: protocol.h:97
Definition: protocol.h:455
Definition: protocol.h:467
Definition: nameplates.h:16
void Reset()
Definition: nameplates.h:22
float m_NameTextFontSize
Definition: nameplates.h:33
STextContainerIndex m_NameTextContainerIndex
Definition: nameplates.h:32
STextContainerIndex m_ClanTextContainerIndex
Definition: nameplates.h:36
SPlayerNamePlate()
Definition: nameplates.h:17
char m_aClan[MAX_CLAN_LENGTH]
Definition: nameplates.h:35
float m_ClanTextFontSize
Definition: nameplates.h:37
char m_aName[MAX_NAME_LENGTH]
Definition: nameplates.h:31
Definition: textrender.h:293
void Reset()
Definition: textrender.h:300