diff options
| author | Alfred Eriksson <somerunce@gmail.com> | 2009-01-24 14:10:26 +0000 |
|---|---|---|
| committer | Alfred Eriksson <somerunce@gmail.com> | 2009-01-24 14:10:26 +0000 |
| commit | 82f9be8ce08000213bd231528707a09da41b0f4c (patch) | |
| tree | 596206f09852f5409e2673c29e98383e9a4b7653 /src/game/client/components/console.cpp | |
| parent | 91e337c7ab2c2a1f10c2ce995e4aa00cdcef20a1 (diff) | |
| download | zcatch-82f9be8ce08000213bd231528707a09da41b0f4c.tar.gz zcatch-82f9be8ce08000213bd231528707a09da41b0f4c.zip | |
added help messages for all commands. added syntax in the help msg
Diffstat (limited to 'src/game/client/components/console.cpp')
| -rw-r--r-- | src/game/client/components/console.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/game/client/components/console.cpp b/src/game/client/components/console.cpp index fe43507c..fd5fe8bf 100644 --- a/src/game/client/components/console.cpp +++ b/src/game/client/components/console.cpp @@ -391,8 +391,13 @@ void CONSOLE::on_render() { if(console->command) { - gfx_text_ex(&info.cursor, "Help: ", -1); - gfx_text_ex(&info.cursor, console->command->help, -1); + + char buf[512]; + str_format(buf, sizeof(buf), "Help: %s ", console->command->help); + gfx_text_ex(&info.cursor, buf, -1); + gfx_text_color(0.75f, 0.75f, 0.75f, 1); + str_format(buf, sizeof(buf), "Syntax: %s %s", console->command->name, console->command->params); + gfx_text_ex(&info.cursor, buf, -1); } } } @@ -493,8 +498,8 @@ void CONSOLE::on_console_init() // console_register_print_callback(client_console_print_callback, this); - MACRO_REGISTER_COMMAND("toggle_local_console", "", CFGFLAG_CLIENT, con_toggle_local_console, this, ""); - MACRO_REGISTER_COMMAND("toggle_remote_console", "", CFGFLAG_CLIENT, con_toggle_remote_console, this, ""); + MACRO_REGISTER_COMMAND("toggle_local_console", "", CFGFLAG_CLIENT, con_toggle_local_console, this, "Toggle local console"); + MACRO_REGISTER_COMMAND("toggle_remote_console", "", CFGFLAG_CLIENT, con_toggle_remote_console, this, "Toggle remote console"); } /* |