diff options
| author | oy <Tom_Adams@web.de> | 2011-04-01 17:57:04 +0200 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2011-04-01 17:57:04 +0200 |
| commit | 9a4426779d4eb474e590ea5be08de91ecb39c806 (patch) | |
| tree | ca6f7fcbefae71ccc2bd6810ab31e800f275ab9c /src/game/client/components/menus.cpp | |
| parent | d7b6c3543b7368d9cab71f794ba9b653d6ed8edf (diff) | |
| download | zcatch-9a4426779d4eb474e590ea5be08de91ecb39c806.tar.gz zcatch-9a4426779d4eb474e590ea5be08de91ecb39c806.zip | |
decreased the font size for some menu buttons and tabs to give translations more room
Diffstat (limited to 'src/game/client/components/menus.cpp')
| -rw-r--r-- | src/game/client/components/menus.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/game/client/components/menus.cpp b/src/game/client/components/menus.cpp index 8a72c425..76109161 100644 --- a/src/game/client/components/menus.cpp +++ b/src/game/client/components/menus.cpp @@ -96,14 +96,18 @@ int CMenus::DoButton_Icon(int ImageId, int SpriteId, const CUIRect *pRect) int CMenus::DoButton_Menu(const void *pID, const char *pText, int Checked, const CUIRect *pRect) { RenderTools()->DrawUIRect(pRect, vec4(1,1,1,0.5f)*ButtonColorMul(pID), CUI::CORNER_ALL, 5.0f); - UI()->DoLabel(pRect, pText, pRect->h*ms_FontmodHeight, 0); + CUIRect Temp; + pRect->HMargin(pRect->h>=20.0f?2.0f:1.0f, &Temp); + UI()->DoLabel(&Temp, pText, Temp.h*ms_FontmodHeight, 0); return UI()->DoButtonLogic(pID, pText, Checked, pRect); } void CMenus::DoButton_KeySelect(const void *pID, const char *pText, int Checked, const CUIRect *pRect) { RenderTools()->DrawUIRect(pRect, vec4(1,1,1,0.5f)*ButtonColorMul(pID), CUI::CORNER_ALL, 5.0f); - UI()->DoLabel(pRect, pText, pRect->h*ms_FontmodHeight, 0); + CUIRect Temp; + pRect->HMargin(1.0f, &Temp); + UI()->DoLabel(&Temp, pText, Temp.h*ms_FontmodHeight, 0); } int CMenus::DoButton_MenuTab(const void *pID, const char *pText, int Checked, const CUIRect *pRect, int Corners) @@ -112,7 +116,9 @@ int CMenus::DoButton_MenuTab(const void *pID, const char *pText, int Checked, co RenderTools()->DrawUIRect(pRect, ms_ColorTabbarActive, Corners, 10.0f); else RenderTools()->DrawUIRect(pRect, ms_ColorTabbarInactive, Corners, 10.0f); - UI()->DoLabel(pRect, pText, pRect->h*ms_FontmodHeight, 0); + CUIRect Temp; + pRect->HMargin(2.0f, &Temp); + UI()->DoLabel(&Temp, pText, Temp.h*ms_FontmodHeight, 0); return UI()->DoButtonLogic(pID, pText, Checked, pRect); } |