Skip to content

Commit 8209b2e

Browse files
authored
Merge pull request CBATeam#1546 from mharis001/keybind-subcat-sorting
Keybinding - Sort subcategories using localized names
2 parents 533f876 + 81a8c06 commit 8209b2e

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

addons/keybinding/fnc_gui_update.sqf

+4-5
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ private _categoryKeyActions = [];
3434
private _action = format ["%1$%2", _addon, _x];
3535
private _subcategory = (GVAR(actions) getVariable _action) param [8, "", [""]];
3636

37+
if (isLocalized _subcategory) then {
38+
_subcategory = localize _subcategory;
39+
};
40+
3741
_categoryKeyActions pushBack [_subcategory, _forEachIndex, _x];
3842
} forEach _addonActions;
3943

@@ -94,11 +98,6 @@ private _tablePosY = 0;
9498
// add subcategory header
9599
if (_createHeader) then {
96100
private _header = _display ctrlCreate [QGVAR(subCat), -1, _ctrlKeyList];
97-
98-
if (isLocalized _subcategory) then {
99-
_subcategory = localize _subcategory;
100-
};
101-
102101
(_header controlsGroupCtrl IDC_SUBCATEGORY_NAME) ctrlSetText format ["%1:", _subcategory];
103102
_header ctrlSetPosition [POS_W(0), _tablePosY];
104103
_header ctrlCommit 0;

0 commit comments

Comments
 (0)