diff options
| author | oy <Tom_Adams@web.de> | 2012-01-08 18:16:38 +0100 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2012-01-08 18:16:38 +0100 |
| commit | e960cbdff3bea74edfbca157679dcf65359e0739 (patch) | |
| tree | 3cf2711fdf42f3d2f558cc660746146497526acd /src/game/client/components/menus_browser.cpp | |
| parent | 3811476c6e69824a6a67b913961c4ab4716eda20 (diff) | |
| download | zcatch-e960cbdff3bea74edfbca157679dcf65359e0739.tar.gz zcatch-e960cbdff3bea74edfbca157679dcf65359e0739.zip | |
added a config to display the code string of a country flag instead of the image. Closes #897
Diffstat (limited to 'src/game/client/components/menus_browser.cpp')
| -rw-r--r-- | src/game/client/components/menus_browser.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/game/client/components/menus_browser.cpp b/src/game/client/components/menus_browser.cpp index 825fe3da..a9c434b3 100644 --- a/src/game/client/components/menus_browser.cpp +++ b/src/game/client/components/menus_browser.cpp @@ -567,12 +567,8 @@ void CMenus::RenderServerbrowserFilters(CUIRect View) float OldWidth = Rect.w; Rect.w = Rect.h*2; Rect.x += (OldWidth-Rect.w)/2.0f; - Graphics()->TextureSet(m_pClient->m_pCountryFlags->GetByCountryCode(g_Config.m_BrFilterCountryIndex)->m_Texture); - Graphics()->QuadsBegin(); - Graphics()->SetColor(1.0f, 1.0f, 1.0f, g_Config.m_BrFilterCountry?1.0f: 0.5f); - IGraphics::CQuadItem QuadItem(Rect.x, Rect.y, Rect.w, Rect.h); - Graphics()->QuadsDrawTL(&QuadItem, 1); - Graphics()->QuadsEnd(); + vec4 Color(1.0f, 1.0f, 1.0f, g_Config.m_BrFilterCountry?1.0f: 0.5f); + m_pClient->m_pCountryFlags->Render(g_Config.m_BrFilterCountryIndex, &Color, Rect.x, Rect.y, Rect.w, Rect.h); if(g_Config.m_BrFilterCountry && UI()->DoButtonLogic(&g_Config.m_BrFilterCountryIndex, "", 0, &Rect)) m_Popup = POPUP_COUNTRY; @@ -766,12 +762,8 @@ void CMenus::RenderServerbrowserServerDetail(CUIRect View) TextRender()->TextEx(&Cursor, pClan, -1); // flag - Graphics()->TextureSet(m_pClient->m_pCountryFlags->GetByCountryCode(pSelectedServer->m_aClients[i].m_Country)->m_Texture); - Graphics()->QuadsBegin(); - Graphics()->SetColor(1.0f, 1.0f, 1.0f, 0.5f); - IGraphics::CQuadItem QuadItem(Flag.x, Flag.y, Flag.w, Flag.h); - Graphics()->QuadsDrawTL(&QuadItem, 1); - Graphics()->QuadsEnd(); + vec4 Color(1.0f, 1.0f, 1.0f, 0.5f); + m_pClient->m_pCountryFlags->Render(pSelectedServer->m_aClients[i].m_Country, &Color, Flag.x, Flag.y, Flag.w, Flag.h); } } } |