Created
April 28, 2020 13:47
-
-
Save Heyoxe/f257e592c31cbd12e3d9883fe1ec4588 to your computer and use it in GitHub Desktop.
Get all Arma Actions Keys.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment