Changed default binds and the button descriptions.

This commit is contained in:
David Salvisberg 2015-01-05 15:05:39 +01:00
parent 160bfc0702
commit 1ff7a6cc47
2 changed files with 28 additions and 25 deletions

View File

@ -80,7 +80,6 @@ static const KbBindingData defaultKbBindings[] =
{ SDL_SCANCODE_SPACE, Input::C }, { SDL_SCANCODE_SPACE, Input::C },
{ SDL_SCANCODE_RETURN, Input::C }, { SDL_SCANCODE_RETURN, Input::C },
{ SDL_SCANCODE_ESCAPE, Input::B }, { SDL_SCANCODE_ESCAPE, Input::B },
{ SDL_SCANCODE_KP_0, Input::B },
{ SDL_SCANCODE_LSHIFT, Input::A }, { SDL_SCANCODE_LSHIFT, Input::A },
{ SDL_SCANCODE_X, Input::B }, { SDL_SCANCODE_X, Input::B },
{ SDL_SCANCODE_D, Input::Z }, { SDL_SCANCODE_D, Input::Z },
@ -114,11 +113,13 @@ static const GcBindingData defaultGcBindings[] =
{ SDL_CONTROLLER_BUTTON_DPAD_UP, Input::Up }, { SDL_CONTROLLER_BUTTON_DPAD_UP, Input::Up },
{ SDL_CONTROLLER_BUTTON_DPAD_DOWN, Input::Down }, { SDL_CONTROLLER_BUTTON_DPAD_DOWN, Input::Down },
{ SDL_CONTROLLER_BUTTON_A, Input::C }, { SDL_CONTROLLER_BUTTON_A, Input::C },
{ SDL_CONTROLLER_BUTTON_A, Input::Y },
{ SDL_CONTROLLER_BUTTON_B, Input::B }, { SDL_CONTROLLER_BUTTON_B, Input::B },
{ SDL_CONTROLLER_BUTTON_START, Input::A }, { SDL_CONTROLLER_BUTTON_B, Input::Z },
{ SDL_CONTROLLER_BUTTON_START, Input::B },
{ SDL_CONTROLLER_BUTTON_X, Input::X }, { SDL_CONTROLLER_BUTTON_X, Input::X },
{ SDL_CONTROLLER_BUTTON_Y, Input::Y }, { SDL_CONTROLLER_BUTTON_Y, Input::R },
{ SDL_CONTROLLER_BUTTON_BACK, Input::Z }, { SDL_CONTROLLER_BUTTON_BACK, Input::A },
{ SDL_CONTROLLER_BUTTON_LEFTSHOULDER, Input::L }, { SDL_CONTROLLER_BUTTON_LEFTSHOULDER, Input::L },
{ SDL_CONTROLLER_BUTTON_RIGHTSHOULDER, Input::R } { SDL_CONTROLLER_BUTTON_RIGHTSHOULDER, Input::R }
}; };
@ -127,14 +128,16 @@ static elementsN(defaultGcBindings);
static const JsBindingData defaultJsBindings[] = static const JsBindingData defaultJsBindings[] =
{ {
{ 0, Input::A }, { 6, Input::A },
{ 7, Input::B },
{ 1, Input::B }, { 1, Input::B },
{ 2, Input::C }, { 0, Input::C },
{ 3, Input::X }, { 2, Input::X },
{ 4, Input::Y }, { 0, Input::Y },
{ 5, Input::Z }, { 1, Input::Z },
{ 6, Input::L }, { 4, Input::L },
{ 7, Input::R } { 3, Input::R },
{ 5, Input::R }
}; };
static elementsN(defaultJsBindings); static elementsN(defaultJsBindings);

View File

@ -37,7 +37,7 @@
#include <algorithm> #include <algorithm>
#include <assert.h> #include <assert.h>
const Vec2i winSize(540, 356); const Vec2i winSize(740, 356);
const uint8_t cBgNorm = 50; const uint8_t cBgNorm = 50;
const uint8_t cBgDark = 20; const uint8_t cBgDark = 20;
@ -54,25 +54,25 @@ static bool pointInRect(const SDL_Rect &r, int x, int y)
typedef SettingsMenuPrivate SMP; typedef SettingsMenuPrivate SMP;
#define BTN_STRING(btn) { Input:: btn, #btn } #define BTN_STRING(btn,desc) { Input:: btn, #desc }
struct VButton struct VButton
{ {
Input::ButtonCode code; Input::ButtonCode code;
const char *str; const char *str;
} static const vButtons[] = } static const vButtons[] =
{ {
BTN_STRING(Up), BTN_STRING(Up,Up),
BTN_STRING(Down), BTN_STRING(Down,Down),
BTN_STRING(L), BTN_STRING(L,L),
BTN_STRING(Left), BTN_STRING(Left,Left),
BTN_STRING(Right), BTN_STRING(Right,Right),
BTN_STRING(R), BTN_STRING(R,W-Atk),
BTN_STRING(A), BTN_STRING(A,Dismount),
BTN_STRING(B), BTN_STRING(B,Cancel),
BTN_STRING(C), BTN_STRING(C,Confirm),
BTN_STRING(X), BTN_STRING(X,A-Atk),
BTN_STRING(Y), BTN_STRING(Y,S-Atk),
BTN_STRING(Z) BTN_STRING(Z,D-Atk)
}; };
static elementsN(vButtons); static elementsN(vButtons);