Big leap for key rebinding and crossplatform-ness.

This commit is contained in:
iProgramInCpp
2023-08-22 17:25:24 +03:00
parent f3fc78e151
commit d3ef629471
10 changed files with 248 additions and 279 deletions

View File

@@ -32,12 +32,12 @@ void KeyboardInput::setKey(int keyCode, bool b)
{
int index = -1;
if (m_pOptions->getKey(KM_FORWARD) == keyCode) index = 0;
if (m_pOptions->getKey(KM_BACK) == keyCode) index = 1;
if (m_pOptions->getKey(KM_LEFT) == keyCode) index = 2;
if (m_pOptions->getKey(KM_RIGHT) == keyCode) index = 3;
if (m_pOptions->getKey(KM_JUMP) == keyCode) index = 4;
if (m_pOptions->getKey(KM_SNEAK) == keyCode) index = 5;
if (m_pOptions->getKey(KM_FORWARD) == keyCode) index = 0;
if (m_pOptions->getKey(KM_BACKWARD) == keyCode) index = 1;
if (m_pOptions->getKey(KM_LEFT) == keyCode) index = 2;
if (m_pOptions->getKey(KM_RIGHT) == keyCode) index = 3;
if (m_pOptions->getKey(KM_JUMP) == keyCode) index = 4;
if (m_pOptions->getKey(KM_SNEAK) == keyCode) index = 5;
if (index == -1)
return;