about summary refs log tree commit diff
path: root/src/game/client/components/menus.cpp
diff options
context:
space:
mode:
authoroy <Tom_Adams@web.de>2010-12-12 19:20:30 +0100
committeroy <Tom_Adams@web.de>2010-12-12 19:20:30 +0100
commitc0530b0d0910e85941b6b4158f2e4b1c9e406ff1 (patch)
treee1b64798269efbf37dd74eae87075f0dc3a4cf5c /src/game/client/components/menus.cpp
parentc75a75b64ff804e7a14374e17b31377aabff0d63 (diff)
downloadzcatch-c0530b0d0910e85941b6b4158f2e4b1c9e406ff1.tar.gz
zcatch-c0530b0d0910e85941b6b4158f2e4b1c9e406ff1.zip
added language popup on first start. Closes #336
Diffstat (limited to 'src/game/client/components/menus.cpp')
-rw-r--r--src/game/client/components/menus.cpp19
1 files changed, 18 insertions, 1 deletions
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;