Jump to content

Recommended Posts

Ok thanks, but I have another question. How can I edit the text so that it will be center over the character ? Text is too much in left side now...

 

IMG:

fi7pd.png

 

Source of AttachTitle:

void CPythonTextTail::AttachTitle(DWORD dwVID, const char * c_szName, const D3DXCOLOR & c_rColor)

{
if (!bPKTitleEnable)
return;
 
TTextTailMap::iterator itor = m_CharacterTextTailMap.find(dwVID);
if (m_CharacterTextTailMap.end() == itor)
return;
 
TTextTail * pTextTail = itor->second;
 
CGraphicTextInstance *& prTitle = pTextTail->pTitleTextInstance;
if (!prTitle)
{
prTitle = CGraphicTextInstance::New();
prTitle->SetTextPointer(ms_pFont);
prTitle->SetOutline(true);
 
if (LocaleService_IsEUROPE())
prTitle->SetHorizonalAlign(CGraphicTextInstance::HORIZONTAL_ALIGN_RIGHT);
else
prTitle->SetHorizonalAlign(CGraphicTextInstance::HORIZONTAL_ALIGN_CENTER);
prTitle->SetVerticalAlign(CGraphicTextInstance::VERTICAL_ALIGN_BOTTOM);
}
 
prTitle->SetValue(c_szName);
prTitle->SetColor(c_rColor.r, c_rColor.g, c_rColor. B);
prTitle->Update();

}

 

Source of AttachLevel:

void CPythonTextTail::AttachLevel(DWORD dwVID, const char * c_szText, const D3DXCOLOR & c_rColor)

{
if (!bPKTitleEnable)
return;
 
TTextTailMap::iterator itor = m_CharacterTextTailMap.find(dwVID);
if (m_CharacterTextTailMap.end() == itor)
return;
 
TTextTail * pTextTail = itor->second;
 
CGraphicTextInstance *& prLevel = pTextTail->pLevelTextInstance;
if (!prLevel)
{
prLevel = CGraphicTextInstance::New();
prLevel->SetTextPointer(ms_pFont);
prLevel->SetOutline(true);
 
prLevel->SetHorizonalAlign(CGraphicTextInstance::HORIZONTAL_ALIGN_RIGHT);
prLevel->SetVerticalAlign(CGraphicTextInstance::VERTICAL_ALIGN_BOTTOM);
}
 
prLevel->SetValue(c_szText);
prLevel->SetColor(c_rColor.r, c_rColor.g, c_rColor. B);
prLevel->Update();
}
 

Edited by Metin2 Dev
Core X - External 2 Internal
  • Angry 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.