mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-09 09:38:19 +00:00
Rename clan related variables, removing Name
from name
This commit is contained in:
parent
0222e4ae96
commit
3afdc20df2
|
@ -107,10 +107,10 @@ void CNamePlates::RenderNameplate(vec2 Position, const CNetObj_PlayerInfo *pPlay
|
||||||
|
|
||||||
if(g_Config.m_ClNameplatesClan)
|
if(g_Config.m_ClNameplatesClan)
|
||||||
{
|
{
|
||||||
if(str_comp(ClientData.m_aClan, NamePlate.m_aClanName) != 0 || FontSizeClan != NamePlate.m_ClanNameTextFontSize)
|
if(str_comp(ClientData.m_aClan, NamePlate.m_aClan) != 0 || FontSizeClan != NamePlate.m_ClanTextFontSize)
|
||||||
{
|
{
|
||||||
str_copy(NamePlate.m_aClanName, ClientData.m_aClan);
|
str_copy(NamePlate.m_aClan, ClientData.m_aClan);
|
||||||
NamePlate.m_ClanNameTextFontSize = FontSizeClan;
|
NamePlate.m_ClanTextFontSize = FontSizeClan;
|
||||||
|
|
||||||
CTextCursor Cursor;
|
CTextCursor Cursor;
|
||||||
TextRender()->SetCursor(&Cursor, 0, 0, FontSizeClan, TEXTFLAG_RENDER);
|
TextRender()->SetCursor(&Cursor, 0, 0, FontSizeClan, TEXTFLAG_RENDER);
|
||||||
|
@ -119,7 +119,7 @@ void CNamePlates::RenderNameplate(vec2 Position, const CNetObj_PlayerInfo *pPlay
|
||||||
float ScreenX0, ScreenY0, ScreenX1, ScreenY1;
|
float ScreenX0, ScreenY0, ScreenX1, ScreenY1;
|
||||||
Graphics()->GetScreen(&ScreenX0, &ScreenY0, &ScreenX1, &ScreenY1);
|
Graphics()->GetScreen(&ScreenX0, &ScreenY0, &ScreenX1, &ScreenY1);
|
||||||
RenderTools()->MapScreenToInterface(m_pClient->m_Camera.m_Center.x, m_pClient->m_Camera.m_Center.y);
|
RenderTools()->MapScreenToInterface(m_pClient->m_Camera.m_Center.x, m_pClient->m_Camera.m_Center.y);
|
||||||
TextRender()->RecreateTextContainer(NamePlate.m_ClanNameTextContainerIndex, &Cursor, ClientData.m_aClan);
|
TextRender()->RecreateTextContainer(NamePlate.m_ClanTextContainerIndex, &Cursor, ClientData.m_aClan);
|
||||||
Graphics()->MapScreen(ScreenX0, ScreenY0, ScreenX1, ScreenY1);
|
Graphics()->MapScreen(ScreenX0, ScreenY0, ScreenX1, ScreenY1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -166,8 +166,8 @@ void CNamePlates::RenderNameplate(vec2 Position, const CNetObj_PlayerInfo *pPlay
|
||||||
if(g_Config.m_ClNameplatesClan)
|
if(g_Config.m_ClNameplatesClan)
|
||||||
{
|
{
|
||||||
YOffset -= FontSizeClan;
|
YOffset -= FontSizeClan;
|
||||||
if(NamePlate.m_ClanNameTextContainerIndex.Valid())
|
if(NamePlate.m_ClanTextContainerIndex.Valid())
|
||||||
TextRender()->RenderTextContainer(NamePlate.m_ClanNameTextContainerIndex, TColor, TOutlineColor, Position.x - TextRender()->GetBoundingBoxTextContainer(NamePlate.m_ClanNameTextContainerIndex).m_W / 2.0f, YOffset);
|
TextRender()->RenderTextContainer(NamePlate.m_ClanTextContainerIndex, TColor, TOutlineColor, Position.x - TextRender()->GetBoundingBoxTextContainer(NamePlate.m_ClanTextContainerIndex).m_W / 2.0f, YOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(g_Config.m_ClNameplatesFriendMark && ClientData.m_Friend)
|
if(g_Config.m_ClNameplatesFriendMark && ClientData.m_Friend)
|
||||||
|
@ -330,7 +330,7 @@ void CNamePlates::ResetNamePlates()
|
||||||
for(auto &NamePlate : m_aNamePlates)
|
for(auto &NamePlate : m_aNamePlates)
|
||||||
{
|
{
|
||||||
TextRender()->DeleteTextContainer(NamePlate.m_NameTextContainerIndex);
|
TextRender()->DeleteTextContainer(NamePlate.m_NameTextContainerIndex);
|
||||||
TextRender()->DeleteTextContainer(NamePlate.m_ClanNameTextContainerIndex);
|
TextRender()->DeleteTextContainer(NamePlate.m_ClanTextContainerIndex);
|
||||||
|
|
||||||
NamePlate.Reset();
|
NamePlate.Reset();
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,19 +22,19 @@ struct SPlayerNamePlate
|
||||||
void Reset()
|
void Reset()
|
||||||
{
|
{
|
||||||
m_NameTextContainerIndex.Reset();
|
m_NameTextContainerIndex.Reset();
|
||||||
m_ClanNameTextContainerIndex.Reset();
|
m_ClanTextContainerIndex.Reset();
|
||||||
m_aName[0] = '\0';
|
m_aName[0] = '\0';
|
||||||
m_aClanName[0] = '\0';
|
m_aClan[0] = '\0';
|
||||||
m_NameTextFontSize = m_ClanNameTextFontSize = 0;
|
m_NameTextFontSize = m_ClanTextFontSize = 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
char m_aName[MAX_NAME_LENGTH];
|
char m_aName[MAX_NAME_LENGTH];
|
||||||
STextContainerIndex m_NameTextContainerIndex;
|
STextContainerIndex m_NameTextContainerIndex;
|
||||||
float m_NameTextFontSize;
|
float m_NameTextFontSize;
|
||||||
|
|
||||||
char m_aClanName[MAX_CLAN_LENGTH];
|
char m_aClan[MAX_CLAN_LENGTH];
|
||||||
STextContainerIndex m_ClanNameTextContainerIndex;
|
STextContainerIndex m_ClanTextContainerIndex;
|
||||||
float m_ClanNameTextFontSize;
|
float m_ClanTextFontSize;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CNamePlates : public CComponent
|
class CNamePlates : public CComponent
|
||||||
|
|
Loading…
Reference in a new issue