about summary refs log tree commit diff
path: root/src/game
diff options
context:
space:
mode:
authoroy <Tom_Adams@web.de>2010-12-08 01:55:13 +0100
committeroy <Tom_Adams@web.de>2010-12-08 01:55:13 +0100
commit4756c031c5bfd931009d16ff4bb84be912508422 (patch)
treedb4e13e5fbc0ebdf5872814430b584dc4edf91be /src/game
parent0fe8cabe78da649187c8cf11d5d2746ab4bb20ac (diff)
downloadzcatch-4756c031c5bfd931009d16ff4bb84be912508422.tar.gz
zcatch-4756c031c5bfd931009d16ff4bb84be912508422.zip
save auto recorded demos in a separate folder and added an option to enable/disable it in the settings menu
Diffstat (limited to 'src/game')
-rw-r--r--src/game/client/components/menus_settings.cpp49
1 files changed, 28 insertions, 21 deletions
diff --git a/src/game/client/components/menus_settings.cpp b/src/game/client/components/menus_settings.cpp
index 119dc2f5..0a3ceca5 100644
--- a/src/game/client/components/menus_settings.cpp
+++ b/src/game/client/components/menus_settings.cpp
@@ -468,10 +468,10 @@ void CMenus::RenderSettingsGraphics(CUIRect MainView)
 	static int s_GfxScreenWidth = g_Config.m_GfxScreenWidth;
 	static int s_GfxScreenHeight = g_Config.m_GfxScreenHeight;
 	static int s_GfxColorDepth = g_Config.m_GfxColorDepth;
-	static int s_GfxFullscreen = g_Config.m_GfxFullscreen;

-	static int s_GfxVsync = g_Config.m_GfxVsync;

-	static int s_GfxFsaaSamples = g_Config.m_GfxFsaaSamples;

-	static int s_GfxTextureQuality = g_Config.m_GfxTextureQuality;

+	static int s_GfxFullscreen = g_Config.m_GfxFullscreen;
+	static int s_GfxVsync = g_Config.m_GfxVsync;
+	static int s_GfxFsaaSamples = g_Config.m_GfxFsaaSamples;
+	static int s_GfxTextureQuality = g_Config.m_GfxTextureQuality;
 	static int s_GfxTextureCompression = g_Config.m_GfxTextureCompression;
 
 	CUIRect ModeList;
@@ -560,20 +560,20 @@ void CMenus::RenderSettingsGraphics(CUIRect MainView)
 	if(DoButton_CheckBox(&g_Config.m_GfxHighDetail, Localize("High Detail"), g_Config.m_GfxHighDetail, &Button))
 		g_Config.m_GfxHighDetail ^= 1;
 
-	// check if the new settings require a restart

-	if(CheckSettings)

-	{

-		if(s_GfxScreenWidth == g_Config.m_GfxScreenWidth &&

-			s_GfxScreenHeight == g_Config.m_GfxScreenHeight &&

-			s_GfxColorDepth == g_Config.m_GfxColorDepth &&

-			s_GfxFullscreen == g_Config.m_GfxFullscreen &&

-			s_GfxVsync == g_Config.m_GfxVsync &&

-			s_GfxFsaaSamples == g_Config.m_GfxFsaaSamples &&

-			s_GfxTextureQuality == g_Config.m_GfxTextureQuality &&

-			s_GfxTextureCompression == g_Config.m_GfxTextureCompression)

-			m_NeedRestartGraphics = false;

-		else

-			m_NeedRestartGraphics = true;

+	// check if the new settings require a restart
+	if(CheckSettings)
+	{
+		if(s_GfxScreenWidth == g_Config.m_GfxScreenWidth &&
+			s_GfxScreenHeight == g_Config.m_GfxScreenHeight &&
+			s_GfxColorDepth == g_Config.m_GfxColorDepth &&
+			s_GfxFullscreen == g_Config.m_GfxFullscreen &&
+			s_GfxVsync == g_Config.m_GfxVsync &&
+			s_GfxFsaaSamples == g_Config.m_GfxFsaaSamples &&
+			s_GfxTextureQuality == g_Config.m_GfxTextureQuality &&
+			s_GfxTextureCompression == g_Config.m_GfxTextureCompression)
+			m_NeedRestartGraphics = false;
+		else
+			m_NeedRestartGraphics = true;
 	}
 
 	//
@@ -610,7 +610,7 @@ void CMenus::RenderSettingsSound(CUIRect MainView)
 {
 	CUIRect Button;
 	MainView.VSplitLeft(300.0f, &MainView, 0);
-	static int s_SndEnable = g_Config.m_SndEnable;

+	static int s_SndEnable = g_Config.m_SndEnable;
 	static int s_SndRate = g_Config.m_SndRate;
 
 	MainView.HSplitTop(20.0f, &Button, &MainView);
@@ -640,7 +640,7 @@ void CMenus::RenderSettingsSound(CUIRect MainView)
 		int Before = g_Config.m_SndRate;
 		g_Config.m_SndRate = max(1, str_toint(aBuf));
 
-		if(g_Config.m_SndRate != Before)

+		if(g_Config.m_SndRate != Before)
 			m_NeedRestartSound = s_SndEnable == g_Config.m_SndEnable && s_SndRate == g_Config.m_SndRate ? false : true;
 	}
 
@@ -729,7 +729,14 @@ void CMenus::RenderSettingsGeneral(CUIRect MainView)
 
 	int OldSelected = s_SelectedLanguage;
 
-	CUIRect List = MainView;
+	CUIRect List, Button;
+	MainView.HSplitBottom(10.0f, &MainView, 0);
+	MainView.HSplitBottom(20.0f, &MainView, &Button);
+	MainView.HSplitBottom(20.0f, &List, &MainView);
+
+	if(DoButton_CheckBox(&g_Config.m_ClAutoDemoRecord, Localize("Automatically record demos"), g_Config.m_ClAutoDemoRecord, &Button))
+		g_Config.m_ClAutoDemoRecord ^= 1;
+
 	UiDoListboxStart(&s_LanguageList , &List, 24.0f, Localize("Language"), "", s_Languages.size(), 1, s_SelectedLanguage, s_ScrollValue);
 
 	for(sorted_array<CLanguage>::range r = s_Languages.all(); !r.empty(); r.pop_front())