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

Arsenal - Export Parent Class #10503

Merged
merged 1 commit into from
Nov 15, 2024
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
47 changes: 46 additions & 1 deletion addons/arsenal/functions/fnc_onKeyDown.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,56 @@ if (!isNull _loadoutsDisplay) then {
"ace" callExtension ["clipboard:append", [_className]];
"ace" callExtension ["clipboard:complete", []];

[_display, LLSTRING(exportedClassnameText)] call FUNC(message);
[_display, format ["%1 - %2", LLSTRING(exportedClassnameText), _className]] call FUNC(message);
} else {
[_display] call FUNC(buttonExport);
};
};
// Export Parent
case (_keyPressed == DIK_P && {_ctrlState}): {
if !(GVAR(leftTabFocus) || {GVAR(rightTabFocus)} || {GVAR(rightTabLnBFocus)}) exitWith {};
switch (true) do {
case (GVAR(leftTabFocus)): {
private _control = (_display displayCtrl IDC_leftTabContent);
_control lbData (lbCurSel _control)
};
case (GVAR(rightTabFocus)): {
private _control = (_display displayCtrl IDC_rightTabContent);
_control lbData (lbCurSel _control)
};
case (GVAR(rightTabLnBFocus)): {
private _control = (_display displayCtrl IDC_rightTabContentListnBox);
_control lnbData [lnbCurSelRow _control, 0]
};
} params ["_className"];

private _cfgConfig = if (GVAR(leftTabFocus)) then {
switch (GVAR(currentLeftPanel)) do {
case IDC_buttonBackpack: {configFile >> "CfgVehicles"};
case IDC_buttonGoggles: {configFile >> "CfgGlasses"};
case IDC_buttonFace: {configFile >> "CfgFaces"};
case IDC_buttonVoice: {configFile >> "CfgVoice"};
case IDC_buttonInsignia: {configFile >> "CfgUnitInsignia"};
default {configFile >> "CfgWeapons"};
}
} else {
switch (GVAR(currentRightPanel)) do {
case IDC_buttonCurrentMag;
case IDC_buttonCurrentMag2;
case IDC_buttonThrow;
case IDC_buttonPut;
case IDC_buttonMag;
case IDC_buttonMagALL: {configFile >> "CfgMagazines"};
default {configFile >> "CfgWeapons"};
}
};

private _parent = configName inheritsFrom (_cfgConfig >> _className);
"ace" callExtension ["clipboard:append", [_parent]];
"ace" callExtension ["clipboard:complete", []];

[_display, format ["%1 - %2", LLSTRING(exportedClassnameText), _parent]] call FUNC(message);
};
// Import button
case (_keyPressed == DIK_V && {_ctrlState}): {
[_display] call FUNC(buttonImport);
Expand Down