2015-01-11 19:32:51 +00:00
|
|
|
/*
|
2015-05-09 02:47:15 +00:00
|
|
|
* Author: Garth de Wet (LH)
|
2015-09-28 13:37:18 +00:00
|
|
|
* Adds an item to the select menu.
|
2015-05-09 02:47:15 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: List container <ARRAY/NUMBER>
|
|
|
|
* 1: Display name <STRING>
|
|
|
|
* 2: Picture <STRING>
|
|
|
|
* 3: Data <STRING/CODE>
|
|
|
|
*
|
2015-09-28 13:37:18 +00:00
|
|
|
* Return Value:
|
|
|
|
* Container <ARRAY, NUMBER>
|
2015-05-09 02:47:15 +00:00
|
|
|
*
|
|
|
|
* Example:
|
2015-05-14 18:00:56 +00:00
|
|
|
* [actions, "Banana", "UI\dot_ca.paa", "bananaContents"] call ace_interaction_fnc_addSelectableItem
|
2015-05-09 02:47:15 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
2015-01-11 23:13:47 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-09-28 13:37:18 +00:00
|
|
|
params ["_container", "_displayName", "_picture", "_data"];
|
2015-01-11 19:32:51 +00:00
|
|
|
|
2015-09-28 13:37:18 +00:00
|
|
|
if (toLower _picture in ["", "picturething"]) then {
|
2015-04-06 16:22:43 +00:00
|
|
|
_picture = QUOTE(PATHTOF(UI\dot_ca.paa));
|
2015-01-11 19:32:51 +00:00
|
|
|
};
|
|
|
|
|
2015-09-28 13:37:18 +00:00
|
|
|
private "_index";
|
2015-03-01 02:00:24 +00:00
|
|
|
_index = lbAdd [_container, _displayName];
|
2015-09-28 13:37:18 +00:00
|
|
|
|
2015-03-01 02:00:24 +00:00
|
|
|
lbSetData [_container, _index, str _data];
|
|
|
|
lbSetPicture [_container, _index, _picture];
|
2015-01-11 19:32:51 +00:00
|
|
|
|
|
|
|
_container
|