about summary refs log tree commit diff
path: root/src/game/client/gc_menu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/client/gc_menu.cpp')
-rw-r--r--src/game/client/gc_menu.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/game/client/gc_menu.cpp b/src/game/client/gc_menu.cpp
index d34d1a2a..693cbcb8 100644
--- a/src/game/client/gc_menu.cpp
+++ b/src/game/client/gc_menu.cpp
@@ -1079,9 +1079,16 @@ static void menu2_render_serverbrowser(RECT main_view)
 			ui2_hsplit_t(&view, 20.0f, &row, &view);
 
 		// make sure that only those in view can be selected
-		if(row.y > original_view.y)
+		if(row.y+row.h > original_view.y)
 		{
-			if(ui2_do_button(item, "", l, &row, 0, 0))
+			RECT temp = row;
+			if(row.y < original_view.y) // clip the selection
+			{
+				temp.h -= original_view.y-temp.y;
+				temp.y = original_view.y;
+			}
+			
+			if(ui2_do_button(item, "", l, &temp, 0, 0))
 			{
 				new_selected = item_index;
 				dbg_msg("dbg", "addr = %s", item->address);