Let the user map unthrottle and rapidfire. Make more keys mappable.

This commit is contained in:
Henrik Rydgard 2013-07-07 11:24:51 +02:00
parent 47dae8c004
commit 19a6edd6cc
3 changed files with 15 additions and 1 deletions

View File

@ -216,6 +216,10 @@ const KeyMap_IntStrPair key_names[] = {
{KEYCODE_F11, "F11"},
{KEYCODE_F12, "F12"},
{KEYCODE_GRAVE, "`"},
{KEYCODE_SLASH, "/"},
{KEYCODE_BACKSLASH, "\\"},
{KEYCODE_SEMICOLON, ";"},
{KEYCODE_COMMA, ","},
{KEYCODE_PERIOD, "."},
@ -305,7 +309,9 @@ const KeyMap_IntStrPair psp_button_names[] = {
{VIRTKEY_AXIS_X_MAX, "An.Right"},
{VIRTKEY_AXIS_Y_MIN, "An.Down"},
{VIRTKEY_AXIS_Y_MAX, "An.Up"},
{VIRTKEY_RAPID_FIRE, "Rapid"},
{VIRTKEY_RAPID_FIRE, "RapidFire"},
{VIRTKEY_UNTHROTTLE, "Unthrottle"},
};
static int psp_button_names_count = sizeof(psp_button_names) / sizeof(psp_button_names[0]);

View File

@ -1580,6 +1580,7 @@ void KeyMappingScreen::render() {
UIText(0, Pos(x+30, y+50), KeyMap::NameDeviceFromPspButton(currentMap_, symbol).c_str(), 0xFFFFFFFF, 0.78f, ALIGN_HCENTER); \
UIText(0, Pos(x+30, y+80), KeyMap::GetPspButtonName(symbol).c_str(), 0xFFFFFFFF, 0.5f, ALIGN_HCENTER); \
// \
// UIText(0, Pos(x, y+50), controllerMaps[currentMap_].name.c_str(), 0xFFFFFFFF, 0.5f, ALIGN_HCENTER);
@ -1616,6 +1617,12 @@ void KeyMappingScreen::render() {
left = 250;
KeyBtn(left, top, CTRL_SELECT);
KeyBtn(left + pad, top, CTRL_START);
top = 10;
left = 750;
KeyBtn(left, top, VIRTKEY_UNTHROTTLE);
top += 150;
KeyBtn(left, top, VIRTKEY_RAPID_FIRE);
#undef KeyBtn
// TODO: Add rapid fire somewhere?

View File

@ -102,6 +102,7 @@ std::map<int, int> windowsTransTable = InitConstMap<int, int>
(VK_SCROLL, KEYCODE_SCROLL_LOCK)
(VK_OEM_1, KEYCODE_SEMICOLON)
(VK_OEM_2, KEYCODE_SLASH)
(VK_OEM_3, KEYCODE_GRAVE)
(VK_OEM_4, KEYCODE_LEFT_BRACKET)
(VK_OEM_6, KEYCODE_RIGHT_BRACKET)
(VK_MENU, KEYCODE_MENU)