From c0530b0d0910e85941b6b4158f2e4b1c9e406ff1 Mon Sep 17 00:00:00 2001 From: oy Date: Sun, 12 Dec 2010 19:20:30 +0100 Subject: added language popup on first start. Closes #336 --- src/game/client/components/menus.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'src/game/client/components/menus.cpp') diff --git a/src/game/client/components/menus.cpp b/src/game/client/components/menus.cpp index 2145ccab..5d9c1bde 100644 --- a/src/game/client/components/menus.cpp +++ b/src/game/client/components/menus.cpp @@ -737,7 +737,7 @@ void CMenus::OnInit() // */ if(g_Config.m_ClShowWelcome) - m_Popup = POPUP_FIRST_LAUNCH; + m_Popup = POPUP_LANGUAGE; g_Config.m_ClShowWelcome = 0; Console()->Chain("add_favorite", ConchainServerbrowserUpdate, this); @@ -971,6 +971,23 @@ int CMenus::Render() static float Offset = 0.0f; DoEditBox(&g_Config.m_Password, &TextBox, g_Config.m_Password, sizeof(g_Config.m_Password), 12.0f, &Offset, true); } + else if(m_Popup == POPUP_LANGUAGE) + { + Box = Screen; + Box.VMargin(150.0f, &Box); + Box.HMargin(150.0f, &Box); + Box.HSplitTop(20.f, &Part, &Box); + Box.HSplitBottom(20.f, &Box, &Part); + Box.HSplitBottom(24.f, &Box, &Part); + Box.HSplitBottom(20.f, &Box, 0); + Box.VMargin(20.0f, &Box); + RenderLanguageSelection(Box); + Part.VMargin(120.0f, &Part); + + static int s_Button = 0; + if(DoButton_Menu(&s_Button, Localize("Ok"), 0, &Part) || m_EscapePressed || m_EnterPressed) + m_Popup = POPUP_FIRST_LAUNCH; + } else if(m_Popup == POPUP_DELETE_DEMO) { CUIRect Yes, No; -- cgit 1.4.1