mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Button to dump array info to clipboard
This commit is contained in:
parent
3c5eac96ea
commit
bace23c331
@ -2,6 +2,7 @@
|
||||
|
||||
ADDON = false;
|
||||
|
||||
PREP(debugDumpToClipboard);
|
||||
PREP(onListBoxSettingsChanged);
|
||||
PREP(onListBoxShowSelectionChanged);
|
||||
PREP(onSettingsMenuOpen);
|
||||
|
60
addons/optionsmenu/functions/fnc_debugDumpToClipboard.sqf
Normal file
60
addons/optionsmenu/functions/fnc_debugDumpToClipboard.sqf
Normal file
@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Dumps debug info to clipboard.
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [] call ACE_optionsmenu_fnc_debugDumpToClipboard
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
_outputString = "Array Variable Count':
|
||||
";
|
||||
|
||||
{
|
||||
private["_var"];
|
||||
_var = missionNamespace getVariable [_x, nil];
|
||||
if(!isnil "_var" && {(typeName _var) == "ARRAY"} ) then {
|
||||
_outputString = _outputString + format["%1 - ARRAY SIZE: %2
|
||||
", _x, (count _var)];
|
||||
};
|
||||
} forEach (allVariables missionNamespace);
|
||||
|
||||
{
|
||||
_unit = _x;
|
||||
{
|
||||
private["_var"];
|
||||
_var = missionNamespace getVariable [_x, nil];
|
||||
if(!isnil "_var" && {(typeName _var) == "ARRAY"} ) then {
|
||||
_outputString = _outputString + text format["%1 - ARRAY SIZE: %2 for %3
|
||||
", _x, (count _var), _unit];
|
||||
};
|
||||
} forEach (allVariables _unit);
|
||||
} forEach allUnits;
|
||||
|
||||
|
||||
FUNC(clipboardExport) = {
|
||||
private["_chunks"];
|
||||
_chunks = [];
|
||||
|
||||
_chunks = [_this select 0, "-"] call CBA_fnc_split;
|
||||
|
||||
{
|
||||
private["_chunk"];
|
||||
_chunk = _x + ";";
|
||||
"ace_clipboard" callExtension format["%1", _chunk];
|
||||
} forEach _chunks;
|
||||
|
||||
"ace_clipboard" callExtension "--COMPLETE--";
|
||||
};
|
||||
|
||||
|
||||
[_outputString] call FUNC(clipboardExport);
|
||||
|
@ -247,6 +247,12 @@ class ACE_settingsMenu {
|
||||
text = "$STR_ACE_OptionsMenu_OpenExport";
|
||||
x = X_PART(18);
|
||||
action = QUOTE(if (GVAR(serverConfigGeneration) > 0) then {createDialog 'ACE_serverSettingsMenu'; });
|
||||
};
|
||||
class action_debug: actionClose {
|
||||
idc = 1102;
|
||||
text = "$STR_ACE_OptionsMenu_DumpDebug";
|
||||
x = X_PART(26.5);
|
||||
action = QUOTE([] call FUNC(debugDumpToClipboard));
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -285,5 +285,8 @@
|
||||
<English>Bottom</English>
|
||||
<Polish>Dół</Polish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_OptionsMenu_DumpDebug">
|
||||
<English>Debug To Clipboard</English>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
|
Loading…
Reference in New Issue
Block a user