Skip to content

Commit

Permalink
use better size
Browse files Browse the repository at this point in the history
  • Loading branch information
Dr.Abc committed Jul 17, 2024
1 parent 300d4eb commit 4ab3ac7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Source/HUD/vgui/textmenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ void CTextMenu::SetContent(const char* szMenu){
m_pMenu->SetText(szMenu);
int w, h;
m_pMenu->GetTextImage()->GetContentSize(w, h);
SetWide(w * 1.1f);
SetTall(h * 1.1f);
m_pMenu->SetPos(GetWide() * 0.05, GetTall() * 0.05);
SetSize(w * 1.1f, h * 1.1f);
m_pMenu->SetSize(w * 1.1f, h * 1.1f);
m_pMenu->SetPos((GetWide() - w) / 2, (GetTall() - h) / 2);
}


Expand Down

0 comments on commit 4ab3ac7

Please sign in to comment.