RenderTools()->DrawUIRect(pRect, ButtonColor, CUI::CORNER_ALL, 3.0f);
static CTextCursor s_Cursor(10.0f);
s_Cursor.MoveTo(pRect->x + pRect->w/2, pRect->y + pRect->h/2);
s_Cursor.Reset();
s_Cursor.m_MaxWidth = pRect->w;
s_Cursor.m_MaxLines = 1;
s_Cursor.m_Align = TEXTALIGN_MC;
TextRender()->TextOutlined(&s_Cursor, pText, -1);
If the length of the text exceeds the maximum width, the text will be truncated and only ...