Skip to content

Commit

Permalink
Merge pull request #1546 from mharis001/keybind-subcat-sorting
Browse files Browse the repository at this point in the history
Keybinding - Sort subcategories using localized names
  • Loading branch information
PabstMirror committed May 15, 2022
2 parents 533f876 + 81a8c06 commit 8209b2e
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 8209b2e

Please sign in to comment.