LV
0
- Joined
- Dec 27, 2025
- Messages
- 4
- Reaction score
- 1
- Points
- 3
Открываем UIHeadSay.cpp
Находим:
C++:
for (int i(0); i<NAME_PART_NUM; i++)
{
if( s_dwNamePartsColors[i][1] )
{
CGuiFont::s_Font.BRender(s_sNamePart[i], x + iStartPosX, y - iNameHeightStep, s_dwNamePartsColors[i][0], s_dwNamePartsColors[i][1] );
}
else
{
CGuiFont::s_Font.Render(s_sNamePart[i], x + iStartPosX, y - iNameHeightStep, s_dwNamePartsColors[i][0] );
}
iStartPosX += CGuiFont::s_Font.GetWidth(s_sNamePart[i]);
}
Заменяем на:
C++:
const bool drawLevelLeft = _pOwn->IsPlayer();
const int gap = 6;
char lvl[32] = {0};
int lvlW = 0;
if (drawLevelLeft)
{
SGameAttr* ga = _pOwn->getGameAttr();
#ifdef _MSC_VER
_snprintf(lvl, sizeof(lvl), "[Lv.%d]", ga ? ga->get(ATTR_LV) : 0);
#else
snprintf(lvl, sizeof(lvl), "[Lv.%d]", ga ? ga->get(ATTR_LV) : 0);
#endif
lvlW = CGuiFont::s_Font.GetWidth(lvl);
}
const int nameW = CGuiFont::s_Font.GetWidth(s_szName);
const int leftCombined = x - ((drawLevelLeft ? (lvlW + gap) : 0) + nameW) / 2;
if (drawLevelLeft)
{
const int lvlX = leftCombined;
const int lvlY = y - iNameHeightStep;
CGuiFont::s_Font.Render(lvl, lvlX, lvlY, COLOR_BLACK);
CGuiFont::s_Font.Render(lvl, lvlX - 1, lvlY - 1, 0xFF00FFFF);
}
iStartPosX = (leftCombined + (drawLevelLeft ? (lvlW + gap) : 0)) - x;
for (int i = 0; i < NAME_PART_NUM; ++i)
{
if (s_dwNamePartsColors[i][1])
{
CGuiFont::s_Font.BRender(
s_sNamePart[i],
x + iStartPosX,
y - iNameHeightStep,
s_dwNamePartsColors[i][0],
s_dwNamePartsColors[i][1]
);
}
else
{
CGuiFont::s_Font.Render(
s_sNamePart[i],
x + iStartPosX,
y - iNameHeightStep,
s_dwNamePartsColors[i][0]
);
}
iStartPosX += CGuiFont::s_Font.GetWidth(s_sNamePart[i]);
}