about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--bam.lua2
-rw-r--r--src/engine/client/graphics.cpp10
-rw-r--r--src/engine/shared/console.cpp3
-rw-r--r--src/game/client/components/menus.cpp3
-rw-r--r--src/game/client/components/menus_browser.cpp5
5 files changed, 18 insertions, 5 deletions
diff --git a/bam.lua b/bam.lua
index 75f46316..6891894b 100644
--- a/bam.lua
+++ b/bam.lua
@@ -4,7 +4,7 @@ Import("configure.lua")
 Import("other/sdl/sdl.lua")
 Import("other/freetype/freetype.lua")
 
---- Setup Config --------
+--- Setup Config -------
 config = NewConfig()
 config:Add(OptCCompiler("compiler"))
 config:Add(OptTestCompileC("stackprotector", "int main(){return 0;}", "-fstack-protector -fstack-protector-all"))
diff --git a/src/engine/client/graphics.cpp b/src/engine/client/graphics.cpp
index 667ba213..e2f4ae4c 100644
--- a/src/engine/client/graphics.cpp
+++ b/src/engine/client/graphics.cpp
@@ -27,6 +27,7 @@
 #include <engine/keys.h>
 
 #include <math.h>
+#include <time.h>
 
 #include "graphics.h"
 
@@ -868,10 +869,17 @@ void CGraphics_SDL::Swap()
 		char aFilename[128];
 		static int Index = 1;
 
+		time_t Time;
+		char aDate[20];
+
+		time(&Time);
+		tm* TimeInfo = localtime(&Time);
+		strftime(aDate, sizeof(aDate), "%Y-%m-%d_%I-%M", TimeInfo);
+
 		for(; Index < 10000; Index++)
 		{
 			IOHANDLE io;
-			str_format(aFilename, sizeof(aFilename), "screenshots/screenshot%05d.png", Index);
+			str_format(aFilename, sizeof(aFilename), "screenshots/screenshot%s-%05d.png", aDate, Index);
 			io = m_pStorage->OpenFile(aFilename, IOFLAG_READ);
 			if(io)
 				io_close(io);
diff --git a/src/engine/shared/console.cpp b/src/engine/shared/console.cpp
index c545b7db..eacf9b78 100644
--- a/src/engine/shared/console.cpp
+++ b/src/engine/shared/console.cpp
@@ -273,7 +273,8 @@ CConsole::CCommand *CConsole::FindCommand(const char *pName)
 
 void CConsole::ExecuteLine(const char *pStr)
 {
-	CConsole::ExecuteLineStroked(1, pStr);
+	CConsole::ExecuteLineStroked(1, pStr); // press it
+	CConsole::ExecuteLineStroked(0, pStr); // then release it
 }
 
 
diff --git a/src/game/client/components/menus.cpp b/src/game/client/components/menus.cpp
index b752f8cb..fc919409 100644
--- a/src/game/client/components/menus.cpp
+++ b/src/game/client/components/menus.cpp
@@ -714,6 +714,9 @@ void CMenus::OnInit()
 
 void CMenus::PopupMessage(const char *pTopic, const char *pBody, const char *pButton)
 {
+	// reset active item
+	UI()->SetActiveItem(0);
+
 	str_copy(m_aMessageTopic, pTopic, sizeof(m_aMessageTopic));
 	str_copy(m_aMessageBody, pBody, sizeof(m_aMessageBody));
 	str_copy(m_aMessageButton, pButton, sizeof(m_aMessageButton));
diff --git a/src/game/client/components/menus_browser.cpp b/src/game/client/components/menus_browser.cpp
index 8d9b11cf..9b816f15 100644
--- a/src/game/client/components/menus_browser.cpp
+++ b/src/game/client/components/menus_browser.cpp
@@ -357,9 +357,10 @@ void CMenus::RenderServerbrowserServerList(CUIRect View)
 	Status.VSplitLeft(260.0f, &QuickSearch, &Status);
 	const char *pLabel = Localize("Quick search:");
 	UI()->DoLabel(&QuickSearch, pLabel, 12.0f, -1);
-	QuickSearch.VSplitLeft(TextRender()->TextWidth(0, 12.0f, pLabel, -1), 0, &QuickSearch);
+	float w = TextRender()->TextWidth(0, 12.0f, pLabel, -1);
+	QuickSearch.VSplitLeft(w, 0, &QuickSearch);
 	QuickSearch.VSplitLeft(5.0f, 0, &QuickSearch);
-	QuickSearch.VSplitLeft(155.0f, &QuickSearch, &Button);
+	QuickSearch.VSplitLeft(260.0f-w-22.0f, &QuickSearch, &Button);
 	static float Offset = 0.0f;
 	DoEditBox(&g_Config.m_BrFilterString, &QuickSearch, g_Config.m_BrFilterString, sizeof(g_Config.m_BrFilterString), 12.0f, &Offset, false, CUI::CORNER_L);
 	// clear button