feat: make weapon wheel key remappable (issue #31)
linux / build (push) Canceled after 13m5s

This commit is contained in:
2026-12-02 16:18:56 +00:00
parent ffbdb3595f
commit a018cf1e77
7 changed files with 49 additions and 2 deletions
+13
View File
@@ -255,6 +255,10 @@ void CControllerConfigManager::InitDefaultControlConfiguration()
SetControllerKeyAssociatedWithAction (PED_CYCLE_WEAPON_LEFT, rsPADDEL, KEYBOARD);
SetControllerKeyAssociatedWithAction (PED_CYCLE_WEAPON_RIGHT, rsPADENTER, OPTIONAL_EXTRA); // BUG: must be KEYBOARD ?
#ifdef IMPROVED_WEAPON_WHEEL
// Default key for the weapon wheel (rebindable in the controls menu).
SetControllerKeyAssociatedWithAction (WEAPON_WHEEL, rsTAB, KEYBOARD);
#endif
SetControllerKeyAssociatedWithAction (PED_LOCK_TARGET, rsDEL, KEYBOARD);
@@ -538,6 +542,9 @@ void CControllerConfigManager::InitialiseControllerActionNameArray()
SETACTIONNAME(TOGGLE_DPAD);
SETACTIONNAME(SWITCH_DEBUG_CAM_ON);
SETACTIONNAME(TAKE_SCREEN_SHOT);
#ifdef IMPROVED_WEAPON_WHEEL
SETACTIONNAME(WEAPON_WHEEL);
#endif
#undef SETACTIONNAME
}
@@ -1697,6 +1704,9 @@ void CControllerConfigManager::DeleteMatchingCommonControls(e_ControllerAction a
CLEAR_ACTION_IF_NEEDED(TOGGLE_DPAD);
CLEAR_ACTION_IF_NEEDED(TAKE_SCREEN_SHOT);
CLEAR_ACTION_IF_NEEDED(SHOW_MOUSE_POINTER_TOGGLE);
#ifdef IMPROVED_WEAPON_WHEEL
CLEAR_ACTION_IF_NEEDED(WEAPON_WHEEL);
#endif
}
}
@@ -1917,6 +1927,9 @@ e_ControllerActionType CControllerConfigManager::GetActionType(e_ControllerActio
case TOGGLE_DPAD:
case TAKE_SCREEN_SHOT:
case SHOW_MOUSE_POINTER_TOGGLE:
#ifdef IMPROVED_WEAPON_WHEEL
case WEAPON_WHEEL:
#endif
return ACTIONTYPE_COMMON;
break;