diff options
| author | Alfred Eriksson <somerunce@gmail.com> | 2009-01-10 11:16:21 +0000 |
|---|---|---|
| committer | Alfred Eriksson <somerunce@gmail.com> | 2009-01-10 11:16:21 +0000 |
| commit | d0d91c412dc8a63cbf2dc0c4f74400a64ad5638b (patch) | |
| tree | 7b708ddc4b66647a9c52b4a34bd3b290dd03575e /src/game/client/components | |
| parent | 599708824fde388c569b32fb3547a5a1b5731478 (diff) | |
| download | zcatch-d0d91c412dc8a63cbf2dc0c4f74400a64ad5638b.tar.gz zcatch-d0d91c412dc8a63cbf2dc0c4f74400a64ad5638b.zip | |
fixed #585
Diffstat (limited to 'src/game/client/components')
| -rw-r--r-- | src/game/client/components/menus.cpp | 68 |
1 files changed, 20 insertions, 48 deletions
diff --git a/src/game/client/components/menus.cpp b/src/game/client/components/menus.cpp index c16a53b7..dd9855b9 100644 --- a/src/game/client/components/menus.cpp +++ b/src/game/client/components/menus.cpp @@ -1037,56 +1037,28 @@ void MENUS::on_render() ui_update(mx,my,mx*3.0f,my*3.0f,buttons); - // render - if(time_get()-last_input > time_freq()*30 && client_state() == CLIENTSTATE_OFFLINE) - { - // screen saver :) - render_background(); - - if(data->images[IMAGE_BANNER].id != 0) - { - float sw = 300*gfx_screenaspect(); - float sh = 300; - gfx_mapscreen(0, 0, sw, sh); - - gfx_texture_set(data->images[IMAGE_BANNER].id); - gfx_quads_begin(); - gfx_setcolor(0,0,0,1.0f); - gfx_quads_draw(sw/2, 50, 300, 300/4); - gfx_setcolor(1,1,1,1.0f); - gfx_quads_draw(sw/2-2, 50-2, 300, 300/4); - gfx_quads_end(); - - //if((time_get()/(time_freq()/3))&1) - // gfx_text(NULL, sw-150, sh-50, 10.0f, "INSERT COIN", -1); + // render + if(client_state() != CLIENTSTATE_DEMOPLAYBACK) + render(); - } - } - else + // render cursor + gfx_texture_set(data->images[IMAGE_CURSOR].id); + gfx_quads_begin(); + gfx_setcolor(1,1,1,1); + gfx_quads_drawTL(mx,my,24,24); + gfx_quads_end(); + + // render debug information + if(config.debug) { - if(client_state() != CLIENTSTATE_DEMOPLAYBACK) - render(); - - // render cursor - gfx_texture_set(data->images[IMAGE_CURSOR].id); - gfx_quads_begin(); - gfx_setcolor(1,1,1,1); - gfx_quads_drawTL(mx,my,24,24); - gfx_quads_end(); - - // render debug information - if(config.debug) - { - RECT screen = *ui_screen(); - gfx_mapscreen(screen.x, screen.y, screen.w, screen.h); - - char buf[512]; - str_format(buf, sizeof(buf), "%p %p %p", ui_hot_item(), ui_active_item(), ui_last_active_item()); - TEXT_CURSOR cursor; - gfx_text_set_cursor(&cursor, 10, 10, 10, TEXTFLAG_RENDER); - gfx_text_ex(&cursor, buf, -1); - } - + RECT screen = *ui_screen(); + gfx_mapscreen(screen.x, screen.y, screen.w, screen.h); + + char buf[512]; + str_format(buf, sizeof(buf), "%p %p %p", ui_hot_item(), ui_active_item(), ui_last_active_item()); + TEXT_CURSOR cursor; + gfx_text_set_cursor(&cursor, 10, 10, 10, TEXTFLAG_RENDER); + gfx_text_ex(&cursor, buf, -1); } escape_pressed = false; |