From c0b9c23aac0783bc7d7b524e661079938cae0ae9 Mon Sep 17 00:00:00 2001 From: Josuan Albin Date: Sun, 5 Nov 2017 14:38:03 +0100 Subject: [PATCH] Add more function headers --- .../arsenal/functions/fnc_addListBoxItem.sqf | 17 ++++++++++++++++- .../arsenal/functions/fnc_addVirtualItems.sqf | 18 ++++++++++++++++++ addons/arsenal/functions/fnc_buttonCargo.sqf | 13 +++++++++++++ addons/arsenal/functions/fnc_buttonExport.sqf | 12 ++++++++++++ addons/arsenal/functions/fnc_buttonHide.sqf | 15 +++++++++++++-- 5 files changed, 72 insertions(+), 3 deletions(-) diff --git a/addons/arsenal/functions/fnc_addListBoxItem.sqf b/addons/arsenal/functions/fnc_addListBoxItem.sqf index 2ac5efe9f3..5455085840 100644 --- a/addons/arsenal/functions/fnc_addListBoxItem.sqf +++ b/addons/arsenal/functions/fnc_addListBoxItem.sqf @@ -1,3 +1,19 @@ +/* + * Author: Dedmen + * Add a listbox row + * + * Arguments: + * 0: Config category (must be "CfgWeapons", "CfgVehicles", "CfgMagazines", "CfgVoice") + * 1: Classname + * 2: Panel control + * 3: Name of the picture entry in that Cfg class + * + * Return Value: + * None + * + * Public: Yes +*/ + #include "script_component.hpp" params ["_configCategory", "_className", "_ctrlPanel", ["_pictureEntryName", "picture", [""]]]; @@ -6,7 +22,6 @@ private _cacheNamespace = _ctrlPanel; //For better readability. private _cachedItemInfo = _cacheNamespace getVariable [_configCategory+_className, []]; //_cachedItemInfo == [_displayName, _itemPicture, _modPicture, _modID] - if (_cachedItemInfo isEqualTo []) then {//Not in cache. So get info and put into cache. private _configPath = configFile >> _configCategory >> _className; diff --git a/addons/arsenal/functions/fnc_addVirtualItems.sqf b/addons/arsenal/functions/fnc_addVirtualItems.sqf index d373fe0905..b502fa69e2 100644 --- a/addons/arsenal/functions/fnc_addVirtualItems.sqf +++ b/addons/arsenal/functions/fnc_addVirtualItems.sqf @@ -1,3 +1,21 @@ +/* + * Author: Alganthe, Dedmen + * Add virtual items to the provided target + * + * Arguments: + * 0: Target + * 1: Items + * 2: Add globally + * + * Return Value: + * None + * + * Example: + * [_box, ["item1", "item2", "itemN"]] call ace_arsenal_fnc_addVirtualItems + * [_box, true, false] call ace_arsenal_fnc_addVirtualItems + * + * Public: Yes +*/ #include "script_component.hpp" #include "..\defines.hpp" diff --git a/addons/arsenal/functions/fnc_buttonCargo.sqf b/addons/arsenal/functions/fnc_buttonCargo.sqf index 68366b1e6a..381317120a 100644 --- a/addons/arsenal/functions/fnc_buttonCargo.sqf +++ b/addons/arsenal/functions/fnc_buttonCargo.sqf @@ -1,3 +1,16 @@ +/* + * Author: Alganthe + * Add or remove item(s) when the + or - button is pressed in the right panel + * + * Arguments: + * 0: Display + * 1: Add or remove (-1: remove, 1: Add) + * + * Return Value: + * None + * + * Public: No +*/ #include "script_component.hpp" #include "..\defines.hpp" diff --git a/addons/arsenal/functions/fnc_buttonExport.sqf b/addons/arsenal/functions/fnc_buttonExport.sqf index 65fc55712e..e52378eccc 100644 --- a/addons/arsenal/functions/fnc_buttonExport.sqf +++ b/addons/arsenal/functions/fnc_buttonExport.sqf @@ -1,3 +1,15 @@ +/* + * Author: Alganthe + * Export current loadout / default loadouts list to clipboard + * + * Arguments: + * 0: Display + * + * Return Value: + * None + * + * Public: No +*/ #include "script_component.hpp" params ["_display"]; diff --git a/addons/arsenal/functions/fnc_buttonHide.sqf b/addons/arsenal/functions/fnc_buttonHide.sqf index 73bfa98d6b..8a190896ba 100644 --- a/addons/arsenal/functions/fnc_buttonHide.sqf +++ b/addons/arsenal/functions/fnc_buttonHide.sqf @@ -1,3 +1,15 @@ +/* + * Author: Alganthe + * Hide arsenal's interface + * + * Arguments: + * 0: Display + * + * Return Value: + * None + * + * Public: No +*/ #include "script_component.hpp" #include "..\defines.hpp" @@ -22,7 +34,6 @@ if (_showToggle) then { IDC_totalWeight, IDC_menuBar, IDC_infoBox, - IDC_stats, IDC_leftTabContent, IDC_rightTabContent, IDC_rightTabContentListnBox, @@ -38,4 +49,4 @@ if (_showToggle) then { RIGHT_PANEL_ITEMS_BACKGROUND_IDCS, RIGHT_PANEL_ITEMS_IDCS, IDC_buttonRemoveAll -]; \ No newline at end of file +];