diff options
| author | Magnus Auvinen <magnus.auvinen@gmail.com> | 2008-03-29 14:34:40 +0000 |
|---|---|---|
| committer | Magnus Auvinen <magnus.auvinen@gmail.com> | 2008-03-29 14:34:40 +0000 |
| commit | ae71bff0869ad0cf8854f79a8429b4699635ab65 (patch) | |
| tree | 570de52666927182b2768b30d86214b93f37c39d /src/game | |
| parent | 68b3c9843acb9ddf2e96d625fbb4db6ddbbfc02a (diff) | |
| download | zcatch-ae71bff0869ad0cf8854f79a8429b4699635ab65.tar.gz zcatch-ae71bff0869ad0cf8854f79a8429b4699635ab65.zip | |
some clean up and increased the size of a strings in the console
Diffstat (limited to 'src/game')
| -rw-r--r-- | src/game/editor/ed_editor.cpp | 24 | ||||
| -rw-r--r-- | src/game/g_variables.h | 2 |
2 files changed, 25 insertions, 1 deletions
diff --git a/src/game/editor/ed_editor.cpp b/src/game/editor/ed_editor.cpp index a7ef9576..8b514c88 100644 --- a/src/game/editor/ed_editor.cpp +++ b/src/game/editor/ed_editor.cpp @@ -2303,6 +2303,26 @@ void EDITOR::render() if(editor.gui_active) render_statusbar(statusbar); + + // + if(config.ed_showkeys) + { + gfx_mapscreen(ui_screen()->x, ui_screen()->y, ui_screen()->w, ui_screen()->h); + TEXT_CURSOR cursor; + gfx_text_set_cursor(&cursor, view.x+10, view.y+view.h-24-10, 24.0f, TEXTFLAG_RENDER); + + int nkeys = 0; + for(int i = 0; i < KEY_LAST; i++) + { + if(inp_key_pressed(i)) + { + if(nkeys) + gfx_text_ex(&cursor, " + ", -1); + gfx_text_ex(&cursor, inp_key_name(i), -1); + nkeys++; + } + } + } // render butt ugly mouse cursor float mx = ui_mouse_x(); @@ -2312,7 +2332,8 @@ void EDITOR::render() if(ui_got_context == ui_hot_item()) gfx_setcolor(1,0,0,1); gfx_quads_drawTL(mx,my, 16.0f, 16.0f); - gfx_quads_end(); + gfx_quads_end(); + } void EDITOR::reset(bool create_default) @@ -2454,6 +2475,7 @@ extern "C" void editor_update_and_render() editor.load("data/maps/debug_test.map"); editor.render(); + inp_clear_events(); } diff --git a/src/game/g_variables.h b/src/game/g_variables.h index 86b40b71..84725ee4 100644 --- a/src/game/g_variables.h +++ b/src/game/g_variables.h @@ -17,6 +17,8 @@ MACRO_CONFIG_INT(cl_mouse_followfactor, 60, 0, 200) MACRO_CONFIG_INT(cl_mouse_max_distance, 800, 0, 0) +MACRO_CONFIG_INT(ed_showkeys, 0, 0, 1) + MACRO_CONFIG_INT(cl_flow, 0, 0, 1) MACRO_CONFIG_INT(cl_show_welcome, 1, 0, 1) |