Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _fnc_localizeKeyArray = {
- params [
- ["_actions", [], []]
- ];
- private _localized = [];
- {
- private _action = _x;
- private _preLocalName = "";
- {
- private _char = _x;
- if (_char in ("ABCDEFGHIJKLMNOPQRSTUVWXYZ" splitString "") && (_forEachIndex > 0)) then {
- _preLocalName = _preLocalName + "_";
- };
- _preLocalName = _preLocalName + _char;
- } forEach (_action splitString "");
- private _name = actionName _action;
- private _tooltip = localize ("str_controls_tooltips_" + _preLocalName);
- _localized pushBack [_action, _name, _tooltip];
- } forEach _actions;
- _localized
- };
- // private _preset = "Arma3";
- // private _actions = configProperties [(configFile >> "CfgDefaultKeysPresets" >> _preset >> "Mappings"), "true", true];
- // private _allKeys = [(_actions apply { configName _x})] call _fnc_localizeKeyArray;
- // _allKeys
- private _groups = configProperties [(configFile >> "UserActionGroups"), "true", true];
- private _keyGroups = [];
- {
- private _group = getArray (_x >> "group");
- private _localized = [_group] call _fnc_localizeKeyArray;
- _keyGroups pushBack [
- getText (_x >> "name"),
- _localized
- ];
- } forEach _groups;
- _keyGroups
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement