Advertisement
Heyoxeeee

Arma 3 Get Actions

Apr 28th, 2020
704
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 1.17 KB | None | 0 0
  1. _fnc_localizeKeyArray = {
  2.     params [
  3.         ["_actions", [], []]
  4.     ];
  5.     private _localized = [];
  6.     {
  7.         private _action = _x;
  8.         private _preLocalName = "";
  9.         {
  10.             private _char = _x;
  11.             if (_char in ("ABCDEFGHIJKLMNOPQRSTUVWXYZ" splitString "") && (_forEachIndex > 0)) then {
  12.                 _preLocalName =  _preLocalName + "_";
  13.             };
  14.             _preLocalName =  _preLocalName + _char;
  15.         } forEach (_action splitString "");
  16.  
  17.         private _name = actionName _action;
  18.         private _tooltip = localize ("str_controls_tooltips_" + _preLocalName);
  19.         _localized pushBack [_action, _name, _tooltip];
  20.     } forEach _actions;
  21.     _localized
  22. };
  23.  
  24. // private _preset = "Arma3";
  25. // private _actions = configProperties [(configFile >> "CfgDefaultKeysPresets" >> _preset >> "Mappings"), "true", true];
  26. // private _allKeys = [(_actions apply { configName _x})] call _fnc_localizeKeyArray;
  27. // _allKeys
  28.  
  29. private _groups = configProperties [(configFile >> "UserActionGroups"), "true", true];
  30. private _keyGroups = [];
  31. {
  32.     private _group = getArray (_x >> "group");
  33.     private _localized = [_group] call _fnc_localizeKeyArray;
  34.     _keyGroups pushBack [
  35.         getText (_x >> "name"),
  36.         _localized
  37.     ];
  38. } forEach _groups;
  39. _keyGroups
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement