Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add setting to always show unit selection number for SP players in namelist #224

Merged
merged 1 commit into from
Oct 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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