From e76e0e6f7e82c267ea657bf72db6b8a40a0a82a6 Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Mon, 20 Oct 2008 22:46:58 +0000 Subject: fixed so that the gui removes previous key binding if you change it --- src/game/client/components/menus_settings.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/game/client/components/menus_settings.cpp b/src/game/client/components/menus_settings.cpp index e2059f46..3db02aa4 100644 --- a/src/game/client/components/menus_settings.cpp +++ b/src/game/client/components/menus_settings.cpp @@ -265,12 +265,15 @@ void MENUS::ui_do_getbuttons(int start, int stop, RECT view) void MENUS::render_settings_controls(RECT main_view) { // this is kinda slow, but whatever + for(int i = 0; i < key_count; i++) + keys[i].keyid = 0; + for(int keyid = 0; keyid < KEY_LAST; keyid++) { const char *bind = gameclient.binds->get(keyid); if(!bind[0]) continue; - + for(int i = 0; i < key_count; i++) if(strcmp(bind, keys[i].command) == 0) { -- cgit 1.4.1