2015-01-11 19:32:51 +00:00
|
|
|
/*
|
|
|
|
Author: Garth de Wet (LH)
|
2015-01-11 23:13:47 +00:00
|
|
|
|
2015-01-11 19:32:51 +00:00
|
|
|
Description:
|
|
|
|
Prepares the select menu for use.
|
2015-01-11 23:13:47 +00:00
|
|
|
|
|
|
|
Parameters:
|
2015-01-11 19:32:51 +00:00
|
|
|
0: TEXT - Header text
|
|
|
|
1: TEXT - Approve button text
|
2015-01-11 23:13:47 +00:00
|
|
|
|
2015-01-11 19:32:51 +00:00
|
|
|
Returns:
|
|
|
|
ARRAY/NUMBER - container object for use with AddSelectableItem.
|
2015-01-11 23:13:47 +00:00
|
|
|
|
2015-01-11 19:32:51 +00:00
|
|
|
Example:
|
2015-01-12 04:20:02 +00:00
|
|
|
["Select Explosive", "Place"] call FUNC(prepareSelectMenu);
|
2015-01-11 19:32:51 +00:00
|
|
|
*/
|
2015-01-11 23:13:47 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-01-11 19:32:51 +00:00
|
|
|
private ["_buttonAction", "_header", "_buttonText", "_cancelButton"];
|
|
|
|
closeDialog 0;
|
2015-01-11 23:13:47 +00:00
|
|
|
if (!(profileNamespace getVariable [QGVAR(FlowMenu), false])) exitWith {
|
2015-01-11 19:32:51 +00:00
|
|
|
_header = _this select 0;
|
|
|
|
_buttonText = _this select 1;
|
|
|
|
if (isNil "_buttonText" or {_buttonText == ""}) then {
|
2015-01-12 04:20:02 +00:00
|
|
|
_buttonText = localize "STR_ACE_Interaction_MakeSelection";
|
2015-01-11 19:32:51 +00:00
|
|
|
};
|
2015-01-12 04:20:02 +00:00
|
|
|
createDialog "RscACE_SelectAnItem";
|
2015-01-11 19:32:51 +00:00
|
|
|
ctrlSetText [8860, _buttonText];
|
|
|
|
ctrlSetText [8870, _header];
|
|
|
|
|
|
|
|
lbClear 8866;
|
|
|
|
|
|
|
|
8866
|
|
|
|
};
|
|
|
|
[]
|