Add ability to reset joystick bindings

This commit is contained in:
simon.kagstrom 2010-01-25 10:49:05 +00:00
parent 14af549037
commit 6d8fd6fc92
2 changed files with 9 additions and 1 deletions

View File

@ -118,6 +118,10 @@ public:
panic("Classic: impossible selection %d", this->p_submenus[4].sel); break;
}
break;
case 11:
printf("Resetting joystick setup to defaults\n");
Gui::gui->popView();
return;
default:
panic("Impossible menu option\n");
break;
@ -206,6 +210,8 @@ public:
this->hm[8] = this->addOne(this->hm[8], this->allocOne("Horiz: %s", stringToPtr_Classic("RAH")));
this->hm[8] = this->addOne(this->hm[8], this->allocOne("Vert: %s", stringToPtr_Classic("RAV")));
this->hm[11] = this->addOne(this->hm[11], "Revert to defaults");
this->help->setHelpMessages(this->hm);
}
@ -386,7 +392,7 @@ private:
HelpBox *help;
int *cur_key;
const char **hm[10];
const char **hm[12];
};
void AnalogueBindListener::selectCallback(DialogueBox *which, int selected)

View File

@ -158,6 +158,8 @@ const char **bind_key_menu_messages = (const char*[]){
/*07*/ "^|Horiz|Vert",
/*08*/ "Classic(right analogue)",
/*09*/ "^|Horiz|Vert",
/*10*/ " ",
/*11*/ "Reset to defaults",
NULL
};