Documentation - Add Arsenal custom sub-item categories (#8678)

* New Info: Adding custom sub item categories

* typo fix

* Custom sub item categories

* Update arsenal.md
This commit is contained in:
shukari 2021-11-15 12:18:54 +01:00 committed by GitHub
parent 4b12047a79
commit ec2028cc8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 40 additions and 2 deletions

View File

@ -9,10 +9,10 @@
* 0: items only misc items <ARRAY of STRING> * 0: items only misc items <ARRAY of STRING>
* 1: tooltip <STRING> (Optional) * 1: tooltip <STRING> (Optional)
* 2: picture path <STRING> (Optional) * 2: picture path <STRING> (Optional)
* 3: override a spezific button (0-9) <NUMBER> (Optional) * 3: override a specific button (0-9) <NUMBER> (Optional)
* *
* Return Value: * Return Value:
* successful: number of the slot; error: -1 <NUMBER> * successful: number of the slot (0-9); error: -1 <NUMBER>
* *
* Example: * Example:
* [["ACE_bloodIV_500", "ACE_Banana"], "MedicalStuff", "\z\ace\addons\arsenal\data\iconCustom.paa", 5] call ace_arsenal_fnc_addRightPanelButton * [["ACE_bloodIV_500", "ACE_Banana"], "MedicalStuff", "\z\ace\addons\arsenal\data\iconCustom.paa", 5] call ace_arsenal_fnc_addRightPanelButton

View File

@ -27,6 +27,7 @@ ACE Arsenal has a pretty large number of improvements over BI Virtual Arsenal, h
- A setting to disable mod icons to increase performance even further. - A setting to disable mod icons to increase performance even further.
- An other setting to invert horizontal camera controls. - An other setting to invert horizontal camera controls.
- Settings to disable the "Default loadouts" and "Public loadouts" tabs. - Settings to disable the "Default loadouts" and "Public loadouts" tabs.
- Custom sub item categories for misc items
<sup>*</sup> Items not currently available in ACE Arsenal but in the unit's inventory, unique items will be omitted when loading loadouts and they can only be removed from containers. <sup>*</sup> Items not currently available in ACE Arsenal but in the unit's inventory, unique items will be omitted when loading loadouts and they can only be removed from containers.

View File

@ -300,3 +300,40 @@ All are local.
| ace_arsenal_loadoutsDisplayClosed | None | 3.12.3 | | ace_arsenal_loadoutsDisplayClosed | None | 3.12.3 |
| ace_arsenal_loadoutsTabChanged | loadouts screen display (DISPLAY), tab control (CONTROL) | 3.12.3 | | ace_arsenal_loadoutsTabChanged | loadouts screen display (DISPLAY), tab control (CONTROL) | 3.12.3 |
| ace_arsenal_loadoutsListFilled | loadouts screen display (DISPLAY), tab control (CONTROL) | 3.12.3 | | ace_arsenal_loadoutsListFilled | loadouts screen display (DISPLAY), tab control (CONTROL) | 3.12.3 |
## 7. Custom sub item categories
### 7.1 Adding a sub item category
`ace_arsenal_fnc_addRightPanelButton`
| | Argument | Type | Optional (default value)
---| -------- | ---- | ------------------------
0 | Misc. items | Array of strings | Required
1 | Tooltip | String | Optional (default: `""`)
2 | Picture path | String | Optional (default: `"\z\ace\addons\arsenal\data\iconCustom.paa"`)
3 | Override a specific button | Number | Optional (default: `-1`)
Return Value:
- successful: number of the slot (0-9)
- error: -1
This function creates a sub category under misc items in the ACE Arsenal.
Only items that are listed under 'Misc Items' are available for sub categories.
If the 'Override a specific button' argument is not used, the button will added at the bottom of the rest.
Examples:
- `[["ACE_bloodIV_500", "ACE_fieldDressing"], "MedicalStuff"] call ace_arsenal_fnc_addRightPanelButton`
- `[["ACE_Banana"], "Fruits", "\path\to\a\picture.paa"] call ace_arsenal_fnc_addRightPanelButton`
Override Examples:
``` sqf
// a category 'Explosives' is created at the bottom (last possible location)
[["ACE_Clacker", "ACE_M26_Clacker"], "Explosives", nil, 9] call ace_arsenal_fnc_addRightPanelButton;
```
``` sqf
// a category 'Flashlights' is created and the buttonId is saved
private _buttonId = [["ACE_Flashlight_MX991", "ACE_Flashlight_KSF1"], "Flashlights", "\path\to\a\pictureWithAFlashlight.paa"] call ace_arsenal_fnc_addRightPanelButton;
// now the category 'better flashlight' is replacing the category 'Flashlights' because it is set on the same button index
[["ACE_Flashlight_XL50"], "better flashlight", "\path\to\a\pictureWithAFlashlight.paa", _buttonId] call ace_arsenal_fnc_addRightPanelButton
```