01-03-2021, 06:19 PM
Engine/Interface/UIEditBox.cpp
Line:134
void CUIEditBox::initialize()
{
m_nTextSY = ( m_nHeight - _pUIFontTexMgr->GetFontHeight() ) / 2;
m_nShowCharCount = ( m_nWidth + _pUIFontTexMgr->GetFontSpacing() ) /
( _pUIFontTexMgr->GetFontWidth() + _pUIFontTexMgr->GetFontSpacing() );
m_nShowCharSize = m_nWidth;
if (m_nMaxCharCount > 0)
{
SAFE_ARRAY_DELETE(m_pInputBuffer);
SAFE_ARRAY_DELETE(m_pTempBuffer);
m_pInputBuffer = new char[m_nMaxCharCount + 1];
m_pInputBuffer[0] = NULL;
m_pTempBuffer = new char[m_nMaxCharCount + 1];
m_pTempBuffer[0] = NULL;
if (m_bIsPWEditBox)
{
SAFE_ARRAY_DELETE(m_pPWBuffer);
m_pPWBuffer = new char[m_nShowCharCount + 1];
m_pPWBuffer[0] = NULL;
}
}
//#ifdef VER_TEST //Remove VER_TEST here
m_bCopyAndPaste = true;
//#endif // VER_TEST
m_pImgSelText = new CUIImage;
addChild((CUIBase*)m_pImgSelText);
m_pImgSelText->setTexString("CommonBtn.tex");
UIRectUV uv;
uv.SetUV(158, 59, 165, 66);
m_pImgSelText->SetUV(uv);
m_pImgSelText->SetColor(0x0000FFCC);
m_pImgSelText->Hide(TRUE);
}
Result: 2

