From 04aeaa0912d6cf6c831e257bdefacf96599e629f Mon Sep 17 00:00:00 2001 From: alganthe Date: Fri, 31 Aug 2018 18:20:55 +0200 Subject: [PATCH 1/2] Add support for mission defined unitInsignias --- addons/arsenal/functions/fnc_fillLeftPanel.sqf | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/addons/arsenal/functions/fnc_fillLeftPanel.sqf b/addons/arsenal/functions/fnc_fillLeftPanel.sqf index 357b1594e0..51b16e2412 100644 --- a/addons/arsenal/functions/fnc_fillLeftPanel.sqf +++ b/addons/arsenal/functions/fnc_fillLeftPanel.sqf @@ -162,6 +162,16 @@ switch true do { { ["CfgUnitInsignia", configName _x, _ctrlPanel, "texture"] call FUNC(addListBoxItem); } foreach ("true" configClasses (configFile >> "CfgUnitInsignia")); + + { + private _displayName = getText (_x >> "displayName"); + private _className = configName _x; + private _lbAdd = _ctrlPanel lbAdd _displayName; + + _ctrlPanel lbSetData [_lbAdd, _className]; + _ctrlPanel lbSetPicture [_lbAdd, getText (_x >> "texture")]; + _ctrlPanel lbSetTooltip [_lbAdd, format ["%1\n%2", _displayName, _className]]; + } foreach ("true" configClasses (missionConfigFile >> "CfgUnitInsignia")); }; }; }; From d13641d670bd02364908f30cdb91c15479787f44 Mon Sep 17 00:00:00 2001 From: alganthe Date: Fri, 31 Aug 2018 18:35:12 +0200 Subject: [PATCH 2/2] Add author support for mission defined unitInsignias --- addons/arsenal/functions/fnc_onSelChangedLeft.sqf | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/addons/arsenal/functions/fnc_onSelChangedLeft.sqf b/addons/arsenal/functions/fnc_onSelChangedLeft.sqf index 6c1e76a239..be49a6c7ac 100644 --- a/addons/arsenal/functions/fnc_onSelChangedLeft.sqf +++ b/addons/arsenal/functions/fnc_onSelChangedLeft.sqf @@ -412,7 +412,14 @@ switch (GVAR(currentLeftPanel)) do { call FUNC(showItem); TOGGLE_RIGHT_PANEL_HIDE - [_display, _control, _curSel, (configFile >> "CfgUnitInsignia" >> _item)] call FUNC(itemInfo); + + private _unitInsigniaConfig = (configFile >> "CfgUnitInsignia" >> _item); + + if (configName _unitInsigniaConfig isEqualTo "") then { + [_display, _control, _curSel, (missionConfigFile >> "CfgUnitInsignia" >> _item)] call FUNC(itemInfo); + } else { + [_display, _control, _curSel, _unitInsigniaConfig] call FUNC(itemInfo); + }; }; };