From 183a8d4d3e005018a0520dcad50f478fbbd5029b Mon Sep 17 00:00:00 2001
From: Will/KJW <100206101+SpicyBagpipes@users.noreply.github.com>
Date: Sat, 4 Jan 2025 12:58:08 -0600
Subject: [PATCH] Arsenal - Add Incomplete Loadout Tooltips (#10572)
Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
---
addons/arsenal/functions/fnc_fillLoadoutsList.sqf | 4 ++++
addons/arsenal/initSettings.inc.sqf | 8 ++++++++
addons/arsenal/stringtable.xml | 3 +++
3 files changed, 15 insertions(+)
diff --git a/addons/arsenal/functions/fnc_fillLoadoutsList.sqf b/addons/arsenal/functions/fnc_fillLoadoutsList.sqf
index 6174193b73d..e6f3ed370f1 100644
--- a/addons/arsenal/functions/fnc_fillLoadoutsList.sqf
+++ b/addons/arsenal/functions/fnc_fillLoadoutsList.sqf
@@ -104,6 +104,10 @@ if (GVAR(currentLoadoutsTab) != IDC_buttonSharedLoadouts) then {
} else {
if (_unavailableItemsList isNotEqualTo []) then {
_contentPanelCtrl lnbSetColor [[_newRow, 1], [1, 1, 1, 0.25]]; // Gray
+
+ if (GVAR(unavailableItemsTooltip)) then {
+ _contentPanelCtrl lnbSetTooltip [[_newRow, 0], format ["Missing Items: %1", _unavailableItemsList arrayIntersect _unavailableItemsList]];
+ };
};
};
diff --git a/addons/arsenal/initSettings.inc.sqf b/addons/arsenal/initSettings.inc.sqf
index 535316b941a..5c2a305d0ee 100644
--- a/addons/arsenal/initSettings.inc.sqf
+++ b/addons/arsenal/initSettings.inc.sqf
@@ -16,6 +16,14 @@ private _category = LLSTRING(settingCategory);
[[0, 1, 2], [ELSTRING(common,Disabled), ELSTRING(common,Enabled), LSTRING(DLCRequirement)], 1]
] call CBA_fnc_addSetting;
+[
+ QGVAR(unavailableItemsTooltip),
+ "CHECKBOX",
+ LLSTRING(unavailableItemsTooltip),
+ _category,
+ false
+] call CBA_fnc_addSetting;
+
[
QGVAR(fontHeight),
"SLIDER",
diff --git a/addons/arsenal/stringtable.xml b/addons/arsenal/stringtable.xml
index 78d299e4468..795b436555d 100644
--- a/addons/arsenal/stringtable.xml
+++ b/addons/arsenal/stringtable.xml
@@ -958,6 +958,9 @@
反转摄影机控制
Kamera kontrollerini ters çevir
+
+ Unavailable Items Tooltip
+
The following loadout was deleted:
Tato sada vybavení byla smazána: