unsigned TextBox::GetTextBoxHeight() const
	{
		FontPtr pFont = Renderer::GetInstance().GetFont(mTextSize);		
		float height = pFont->GetHeight();
		pFont->SetBackToOrigHeight();
		return Round(height * mNumTextLines) + 16;
	}
	void TextBox::CalcTextWidth()
	{
		// analyze the text length
		FontPtr pFont = Renderer::GetInstance().GetFont(mTextSize);
		unsigned width = mSize.x;		
		float textWidth;
		mMultiLineText = pFont->InsertLineFeed((const char*)mTextw.c_str(), mTextw.size() * 2, width, &textWidth, &mNumTextLines);
		mTextWidth = (unsigned)Round(textWidth);
		pFont->SetBackToOrigHeight();
		mUIObject->SetText(mMultiLineText.c_str());
	}