diff options
| -rw-r--r-- | src/game/client/gc_client.cpp | 16 | ||||
| -rw-r--r-- | src/game/client/gc_menu.cpp | 32 |
2 files changed, 31 insertions, 17 deletions
diff --git a/src/game/client/gc_client.cpp b/src/game/client/gc_client.cpp index ed31d5a0..c40b91a6 100644 --- a/src/game/client/gc_client.cpp +++ b/src/game/client/gc_client.cpp @@ -563,6 +563,14 @@ extern "C" void modc_init() float total = data->num_sounds+data->num_images; float current = 0; + // load textures + for(int i = 0; i < data->num_images; i++) + { + render_loading(current/total); + data->images[i].id = gfx_load_texture(data->images[i].filename); + current++; + } + // load sounds for(int s = 0; s < data->num_sounds; s++) { @@ -581,14 +589,6 @@ extern "C" void modc_init() current++; } - // load textures - for(int i = 0; i < data->num_images; i++) - { - render_loading(current/total); - data->images[i].id = gfx_load_texture(data->images[i].filename); - current++; - } - skin_init(); } 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(); |