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

Keybinding - Sort subcategories using localized names #1546

Merged
merged 1 commit into from
May 15, 2022
Merged
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
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