Skip to content

Commit

Permalink
Inventory - Add context menu options for pointers and optics (#1328)
Browse files Browse the repository at this point in the history
  • Loading branch information
veteran29 authored Apr 25, 2020
1 parent 74d1550 commit a0ecff5
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions addons/accessory/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,21 @@ if (!hasInterface) exitWith {};
[ELSTRING(common,WeaponsCategory), "MRT_SwitchItemPrevClass_O", [LSTRING(opticPrev), LSTRING(opticPrev_tooltip)], {
[2, "prev"] call FUNC(switchAttachment) // return
}, {}, [DIK_SUBTRACT, [true, false, false]]] call CBA_fnc_addKeybind;

[
"##AccessoryPointer", "ALL", [LSTRING(railNext), LSTRING(railNext_tooltip)], nil, nil, {
params ["", "", "_item"];
count (_item call CBA_fnc_switchableAttachments) > 1 // return
}, {
[1, "next"] call FUNC(switchAttachment) // return
}
] call CBA_fnc_addItemContextMenuOption;

[
"##AccessorySights", "ALL", [LSTRING(opticNext), LSTRING(opticNext_tooltip)], nil, nil, {
params ["", "", "_item"];
count (_item call CBA_fnc_switchableAttachments) > 1 // return
}, {
[2, "next"] call FUNC(switchAttachment) // return
}
] call CBA_fnc_addItemContextMenuOption;

0 comments on commit a0ecff5

Please sign in to comment.