From: Ingo Ruhnke Date: Wed, 28 Apr 2004 20:51:25 +0000 (+0000) Subject: - removed joystick setup menu, since it won't work anyway X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=f17e417e36a9913f8fcad269a1d6d557c4ea1585;p=supertux.git - removed joystick setup menu, since it won't work anyway - changed wording from key to keyboard - fixed strcpy versus change_input SVN-Revision: 820 --- diff --git a/src/menu.cpp b/src/menu.cpp index bbf15618a..b8c41e9d3 100644 --- a/src/menu.cpp +++ b/src/menu.cpp @@ -158,43 +158,47 @@ void Menu::get_controlfield_key_into_input(MenuItem *item) switch(*item->int_p) { case SDLK_UP: - strcpy(item->input, "Up cursor"); + item->change_input("Up cursor"); break; case SDLK_DOWN: - strcpy(item->input, "Down cursor"); + item->change_input("Down cursor"); break; case SDLK_LEFT: - strcpy(item->input, "Left cursor"); + item->change_input("Left cursor"); break; case SDLK_RIGHT: - strcpy(item->input, "Right cursor"); + item->change_input("Right cursor"); break; case SDLK_RETURN: - strcpy(item->input, "Return"); + item->change_input("Return"); break; case SDLK_SPACE: - strcpy(item->input, "Space"); + item->change_input("Space"); break; case SDLK_RSHIFT: - strcpy(item->input, "Right Shift"); + item->change_input("Right Shift"); break; case SDLK_LSHIFT: - strcpy(item->input, "Left Shift"); + item->change_input("Left Shift"); break; case SDLK_RCTRL: - strcpy(item->input, "Right Control"); + item->change_input("Right Control"); break; case SDLK_LCTRL: - strcpy(item->input, "Left Control"); + item->change_input("Left Control"); break; case SDLK_RALT: - strcpy(item->input, "Right Alt"); + item->change_input("Right Alt"); break; case SDLK_LALT: - strcpy(item->input, "Left Alt"); + item->change_input("Left Alt"); break; default: - strcpy(item->input, (char*)item->int_p); + { + char tmp[64]; + snprintf(tmp, 64, "%d", *item->int_p); + item->change_input(tmp); + } break; } } diff --git a/src/setup.cpp b/src/setup.cpp index d28669126..fc8f269c3 100644 --- a/src/setup.cpp +++ b/src/setup.cpp @@ -405,9 +405,11 @@ void st_menu(void) options_menu->additem(MN_DEACTIVE,"Music ", false,0, MNID_MUSIC); } options_menu->additem(MN_TOGGLE,"Show FPS ",show_fps,0, MNID_SHOWFPS); - options_menu->additem(MN_GOTO,"Key Setup",0,options_keys_menu); - if(use_joystick) - options_menu->additem(MN_GOTO,"Joystick Setup",0,options_joystick_menu); + options_menu->additem(MN_GOTO,"Keyboard Setup",0,options_keys_menu); + + //if(use_joystick) + // options_menu->additem(MN_GOTO,"Joystick Setup",0,options_joystick_menu); + options_menu->additem(MN_HL,"",0,0); options_menu->additem(MN_BACK,"Back",0,0);