Skip to content

Commit

Permalink
Keybinding - Sort subcategories using localized names
Browse files Browse the repository at this point in the history
  • Loading branch information
mharis001 committed May 15, 2022
1 parent 533f876 commit 81a8c06
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions addons/keybinding/fnc_gui_update.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ private _categoryKeyActions = [];
private _action = format ["%1$%2", _addon, _x];
private _subcategory = (GVAR(actions) getVariable _action) param [8, "", [""]];

if (isLocalized _subcategory) then {
_subcategory = localize _subcategory;
};

_categoryKeyActions pushBack [_subcategory, _forEachIndex, _x];
} forEach _addonActions;

Expand Down Expand Up @@ -94,11 +98,6 @@ private _tablePosY = 0;
// add subcategory header
if (_createHeader) then {
private _header = _display ctrlCreate [QGVAR(subCat), -1, _ctrlKeyList];

if (isLocalized _subcategory) then {
_subcategory = localize _subcategory;
};

(_header controlsGroupCtrl IDC_SUBCATEGORY_NAME) ctrlSetText format ["%1:", _subcategory];
_header ctrlSetPosition [POS_W(0), _tablePosY];
_header ctrlCommit 0;
Expand Down

0 comments on commit 81a8c06

Please sign in to comment.