Skip to content

Commit cb73f68

Browse files
authored
Change Icon Setting to List (#228)
1 parent e092e63 commit cb73f68

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

addons/main/stringtable.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2059,6 +2059,9 @@
20592059
<Key ID="STR_dui_radar_enable_seat_icons_desc">
20602060
<English>When enabled will show if a unit is in a vehicle or not.</English>
20612061
</Key>
2062+
<Key ID="STR_dui_radar_enable_seat_icons_sameVehicle">
2063+
<English>Only in the same vehicle</English>
2064+
</Key>
20622065
<Key ID="STR_dui_radar_pointer_style">
20632066
<English>Pointer style</English>
20642067
<Chinesesimp>指向风格</Chinesesimp>

addons/radar/XEH_preInit.sqf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,10 +387,10 @@ private _curCat = localize "STR_dui_cat_compass";
387387

388388
[
389389
QGVAR(enable_seat_icons)
390-
,"CHECKBOX"
390+
,"LIST"
391391
,[localize "STR_dui_radar_enable_seat_icons", localize "STR_dui_radar_enable_seat_icons_desc"]
392392
,[CBA_SETTINGS_CAT, _curCat]
393-
,true
393+
,[[0, 1, 2], [localize "STR_dui_show_dir_opt1", localize "STR_dui_radar_enable_seat_icons_sameVehicle", localize "STR_dui_show_dir_opt3"], 2]
394394
,false
395395
] call CBA_fnc_addSetting;
396396

addons/radar/functions/fnc_cacheLoop.sqf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ private _speakingArray = ["", EGVAR(main,speakingIcon), EGVAR(main,speakingRadio
5252
{
5353
if (alive _x) then {
5454
_x setVariable [QGVAR(compass_icon), [_x, _iconNamespace, _player, true] call FUNC(getIcon)];
55-
_x setVariable [QGVAR(icon), [_x, _iconNamespace] call FUNC(getIcon)];
55+
_x setVariable [QGVAR(icon), [_x, _iconNamespace, _player] call FUNC(getIcon)];
5656
};
5757
} forEach _group;
5858

addons/radar/functions/fnc_getIcon.sqf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ if (!_forCompass && {GVAR(showRank)}) exitWith {
77
_namespace getVariable [rank _unit, DUI_RANK_PRIVATE];
88
};
99

10-
if (GVAR(enable_seat_icons) && {!(isNull objectParent _unit || {_forCompass})}) exitWith {
10+
if (
11+
(GVAR(enable_seat_icons) == 2 || {GVAR(enable_seat_icons) == 1 && {vehicle _unit == vehicle _player}}) &&
12+
{!(isNull objectParent _unit || {_forCompass})}
13+
) exitWith {
1114
private _crewInfo = ((fullCrew (vehicle _unit)) select {_x select 0 isEqualTo _unit}) select 0;
1215
_crewInfo params ["", "_role", "", "", "_isTurret"];
1316

0 commit comments

Comments
 (0)