2015-06-27 02:11:57 +00:00
|
|
|
/*
|
|
|
|
* Author: Jonpas
|
|
|
|
* Adds controller slide actions.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Controller <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* Children Actions <ARRAY>
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [controller] call ace_slideshow_fnc_addSlideActions;
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
|
|
|
PARAMS_1(_controller);
|
|
|
|
|
|
|
|
private ["_slides", "_actions"];
|
|
|
|
|
2015-06-29 19:07:51 +00:00
|
|
|
_slides = _controller getVariable QGVAR(slides);
|
2015-06-27 02:11:57 +00:00
|
|
|
EXPLODE_3_PVT(_slides,_objects,_images,_names);
|
|
|
|
|
|
|
|
_actions = [];
|
|
|
|
{
|
|
|
|
_actions pushBack
|
|
|
|
[
|
|
|
|
[
|
|
|
|
format ["Slide_%1", _forEachIndex],
|
|
|
|
_names select _forEachIndex,
|
|
|
|
"",
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_x setObjectTextureGlobal [0, (_this select 2) select 1]
|
|
|
|
} forEach ((_this select 2) select 0);
|
|
|
|
},
|
|
|
|
{true},
|
|
|
|
{},
|
2015-06-27 02:23:21 +00:00
|
|
|
[_objects, _x]
|
2015-06-27 02:11:57 +00:00
|
|
|
] call EFUNC(interact_menu,createAction),
|
|
|
|
[],
|
|
|
|
_controller
|
|
|
|
];
|
|
|
|
} forEach _images;
|
|
|
|
|
|
|
|
_actions
|