Skip to content

Commit

Permalink
Add setting to always show unit selection number for SP players (#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
diwako authored Oct 5, 2024
1 parent 58c5250 commit d4e1ed6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
6 changes: 6 additions & 0 deletions addons/main/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2210,5 +2210,11 @@
<Turkish>Sıhhiyeler ACE ayarlarına göre mi vanilya ayarlara göre mi belirlensin?</Turkish>
<Spanish>Elija si mostrar a los médicos por rasgo básico o variable ACE</Spanish>
</Key>
<Key ID="STR_dui_radar_always_show_unit_numbers">
<English>Always show unit selection number</English>
</Key>
<Key ID="STR_dui_radar_always_show_unit_numbers_desc">
<English>Will always show the unit number the squad leader can use to select a squad member using the function keys</English>
</Key>
</Package>
</Project>
9 changes: 9 additions & 0 deletions addons/radar/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,15 @@ if (isClass(configFile >> "CfgPatches" >> "ace_finger")) then {
] call CBA_fnc_addSetting;
};

[
QGVAR(always_show_unit_numbers)
,"CHECKBOX"
,[localize "STR_dui_radar_always_show_unit_numbers", localize "STR_dui_radar_always_show_unit_numbers_desc"]
,[CBA_SETTINGS_CAT, _curCat]
,false
,false
] call CBA_fnc_addSetting;

// todo display to change the position in-game (should reset to center of screen)(0.5,0.5)
// todo keydown or option for ^ (or addAction(resets after use))
// save it in profileNamespace
Expand Down
2 changes: 1 addition & 1 deletion addons/radar/functions/fnc_cacheLoop.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ private _circleRange = diwako_dui_compassRange;

private _unit = _x;
private _selected = "";
if (_selectedUnits isNotEqualTo [] && {_unit isNotEqualTo _player}) then {
if ((GVAR(always_show_unit_numbers) || {_selectedUnits isNotEqualTo []}) && {_unit isNotEqualTo _player}) then {
private _curName = vehicleVarName _unit;
_unit setVehicleVarName "";
private _defaultIdent = str _unit;
Expand Down

0 comments on commit d4e1ed6

Please sign in to comment.