mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Readding file that git removed
This commit is contained in:
parent
1ad2a5cdf1
commit
0bf56d64bd
32
addons/interaction/functions/fnc_addSelectableItem.sqf
Normal file
32
addons/interaction/functions/fnc_addSelectableItem.sqf
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Author: Garth de Wet (LH)
|
||||||
|
* Adds an item to the select menu
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: List container <ARRAY/NUMBER>
|
||||||
|
* 1: Display name <STRING>
|
||||||
|
* 2: Picture <STRING>
|
||||||
|
* 3: Data <STRING/CODE>
|
||||||
|
*
|
||||||
|
* Return value:
|
||||||
|
* Container <ARRAY/NUMBER>
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [actions, "Banana", "UI\dot_ca.paa", "bananaContents"] call ace_interaction_fnc_addSelectableItem
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
PARAMS_4(_container,_displayName,_picture,_data);
|
||||||
|
|
||||||
|
if (_picture == "" || _picture == "PictureThing") then {
|
||||||
|
_picture = QUOTE(PATHTOF(UI\dot_ca.paa));
|
||||||
|
};
|
||||||
|
|
||||||
|
private ["_index"];
|
||||||
|
_index = lbAdd [_container, _displayName];
|
||||||
|
lbSetData [_container, _index, str _data];
|
||||||
|
lbSetPicture [_container, _index, _picture];
|
||||||
|
|
||||||
|
_container
|
Loading…
Reference in New Issue
Block a user