about summary refs log tree commit diff
path: root/src/game/client/gc_menu.cpp
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2007-12-17 00:44:03 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2007-12-17 00:44:03 +0000
commitb6ccb8bd8b2f12707ea4150687d2ae481af4ecdb (patch)
tree101838f9768f14f8b103f494bcabcef47b09877d /src/game/client/gc_menu.cpp
parenta6aec9e0cd6901ce8cddef57f876626f9e3de7eb (diff)
downloadzcatch-b6ccb8bd8b2f12707ea4150687d2ae481af4ecdb.tar.gz
zcatch-b6ccb8bd8b2f12707ea4150687d2ae481af4ecdb.zip
added some finess to the gui
Diffstat (limited to 'src/game/client/gc_menu.cpp')
-rw-r--r--src/game/client/gc_menu.cpp32
1 files changed, 23 insertions, 9 deletions
diff --git a/src/game/client/gc_menu.cpp b/src/game/client/gc_menu.cpp
index 978904df..a813033c 100644
--- a/src/game/client/gc_menu.cpp
+++ b/src/game/client/gc_menu.cpp
@@ -795,14 +795,28 @@ static int menu2_render_menubar(RECT r)
 
 static void menu2_render_background()
 {
-	gfx_clear(gui_color.r, gui_color.g, gui_color.b);
-	
-	gfx_texture_set(data->images[IMAGE_BANNER].id);
+	RECT s = *ui2_screen();
+
+	gfx_texture_set(-1);
 	gfx_quads_begin();
-	gfx_setcolor(0,0,0,0.05f);
-	gfx_quads_setrotation(-pi/4+0.15f);
-	gfx_quads_draw(400, 300, 1000, 250);
+		vec4 bottom(gui_color.r*0.6f, gui_color.g*0.6f, gui_color.b*0.6f, 1.0f);
+		vec4 top(gui_color.r, gui_color.g, gui_color.b, 1.0f);
+		gfx_setcolorvertex(0, top.r, top.g, top.b, top.a);
+		gfx_setcolorvertex(1, top.r, top.g, top.b, top.a);
+		gfx_setcolorvertex(2, bottom.r, bottom.g, bottom.b, bottom.a);
+		gfx_setcolorvertex(3, bottom.r, bottom.g, bottom.b, bottom.a);
+		gfx_quads_drawTL(0, 0, s.w, s.h);
 	gfx_quads_end();
+	
+	if(data->images[IMAGE_BANNER].id != 0)
+	{
+		gfx_texture_set(data->images[IMAGE_BANNER].id);
+		gfx_quads_begin();
+		gfx_setcolor(0,0,0,0.05f);
+		gfx_quads_setrotation(-pi/4+0.15f);
+		gfx_quads_draw(400, 300, 1000, 250);
+		gfx_quads_end();
+	}
 }
 
 void render_loading(float percent)
@@ -811,10 +825,10 @@ void render_loading(float percent)
 	vec3 rgb = hsl_to_rgb(vec3(config.ui_color_hue/255.0f, config.ui_color_sat/255.0f, config.ui_color_lht/255.0f));
 	gui_color = vec4(rgb.r, rgb.g, rgb.b, config.ui_color_alpha/255.0f);
 	
-	gfx_clear(gui_color.r, gui_color.g, gui_color.b);
-	
     RECT screen = *ui2_screen();
 	gfx_mapscreen(screen.x, screen.y, screen.w, screen.h);
+	
+	menu2_render_background();
 
 	float tw;
 
@@ -838,7 +852,7 @@ void render_loading(float percent)
 
 	gfx_texture_set(-1);
 	gfx_quads_begin();
-	gfx_setcolor(1,1,1,1.0f);
+	gfx_setcolor(1,1,1,0.75f);
 	draw_round_rect(x+40, y+h-75, (w-80)*percent, 25, 5.0f);
 	gfx_quads_end();