From 8a4ab15fd178b02f000486600137b9f31b8541ae Mon Sep 17 00:00:00 2001 From: He-Man Date: Thu, 5 Oct 2017 21:58:24 +0200 Subject: [PATCH] override default action, if FavBar slot has item --- .../compile/interface_event_handlers/EPOCH_KeyDown.sqf | 2 +- Sources/epoch_code/gui/scripts/favBar/epoch_favBar_action.sqf | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/epoch_code/compile/interface_event_handlers/EPOCH_KeyDown.sqf b/Sources/epoch_code/compile/interface_event_handlers/EPOCH_KeyDown.sqf index 43f87523..54623be3 100644 --- a/Sources/epoch_code/compile/interface_event_handlers/EPOCH_KeyDown.sqf +++ b/Sources/epoch_code/compile/interface_event_handlers/EPOCH_KeyDown.sqf @@ -52,7 +52,7 @@ if !(EPOCH_modKeys isequalto [_shift,_ctrl,_alt]) then { //Favorites bar if (_dikCode in [EPOCH_keysfav1,EPOCH_keysfav2,EPOCH_keysfav3,EPOCH_keysfav4,EPOCH_keysfav5]) then { if (isnull EPOCH_Target) then { - _this call epoch_favBar_action; + _handled = _this call epoch_favBar_action; } else { "Can't use while in building mode!" call epoch_message; }; diff --git a/Sources/epoch_code/gui/scripts/favBar/epoch_favBar_action.sqf b/Sources/epoch_code/gui/scripts/favBar/epoch_favBar_action.sqf index 673c9714..867f9f23 100644 --- a/Sources/epoch_code/gui/scripts/favBar/epoch_favBar_action.sqf +++ b/Sources/epoch_code/gui/scripts/favBar/epoch_favBar_action.sqf @@ -25,6 +25,7 @@ _tileIdx = switch (_kee) do { }; _item = rmx_var_favBar_current select _tileIdx; +if (_item isequalto "") exitwith {false}; _throw = ""; { if (_item in (getarray (_x >> "Magazines"))) exitwith {