diff --git a/src/engine/client/text.cpp b/src/engine/client/text.cpp index 57e1b43b5..8fa8efeeb 100644 --- a/src/engine/client/text.cpp +++ b/src/engine/client/text.cpp @@ -681,7 +681,7 @@ public: Advance = pChr->m_AdvanceX + Kerning(pFont, Character, Nextcharacter)/Size; } - if(pCursor->m_Flags&TEXTFLAG_STOP_AT_END && DrawX+Advance*Size-pCursor->m_StartX > pCursor->m_LineWidth) + if(pCursor->m_Flags&TEXTFLAG_STOP_AT_END && DrawX+(Advance+pChr->m_Width)*Size-pCursor->m_StartX > pCursor->m_LineWidth) { // we hit the end of the line, no more to render or count pCurrent = pEnd; diff --git a/src/game/client/components/menus_browser.cpp b/src/game/client/components/menus_browser.cpp index 9b816f155..32243a2a9 100644 --- a/src/game/client/components/menus_browser.cpp +++ b/src/game/client/components/menus_browser.cpp @@ -309,7 +309,12 @@ void CMenus::RenderServerbrowserServerList(CUIRect View) TextRender()->TextEx(&Cursor, pItem->m_aName, -1); } else if(Id == COL_MAP) - UI()->DoLabel(&Button, pItem->m_aMap, 12.0f, -1); + { + CTextCursor Cursor; + TextRender()->SetCursor(&Cursor, Button.x, Button.y, 12.0f, TEXTFLAG_RENDER|TEXTFLAG_STOP_AT_END); + Cursor.m_LineWidth = Button.w; + TextRender()->TextEx(&Cursor, pItem->m_aMap, -1); + } else if(Id == COL_PLAYERS) { str_format(aTemp, sizeof(aTemp), "%i/%i", pItem->m_NumPlayers, pItem->m_MaxPlayers); @@ -332,7 +337,10 @@ void CMenus::RenderServerbrowserServerList(CUIRect View) } else if(Id == COL_GAMETYPE) { - UI()->DoLabel(&Button, pItem->m_aGameType, 12.0f, 0); + CTextCursor Cursor; + TextRender()->SetCursor(&Cursor, Button.x, Button.y, 12.0f, TEXTFLAG_RENDER|TEXTFLAG_STOP_AT_END); + Cursor.m_LineWidth = Button.w; + TextRender()->TextEx(&Cursor, pItem->m_aGameType, -1); } }