Grim4ik Posted October 15 Share Posted October 15 (edited) Открываем UIHeadSay.cpp Находим: 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]); } Заменяем на: 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]); } Edited October 15 by Grim4ik Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.