2015-06-27 02:11:57 +00:00
|
|
|
/*
|
|
|
|
* Author: Jonpas
|
|
|
|
* Adds controller slide actions.
|
|
|
|
*
|
|
|
|
* Arguments:
|
2015-07-13 20:07:21 +00:00
|
|
|
* 0: Objects <ARRAY>
|
|
|
|
* 1: Images <ARRAY>
|
|
|
|
* 2: Names <ARRAY>
|
|
|
|
* 3: Controller <OBJECT>
|
|
|
|
* 4: Current Slideshow <NUMBER>
|
2015-06-27 02:11:57 +00:00
|
|
|
*
|
|
|
|
* Return Value:
|
2015-07-13 20:07:21 +00:00
|
|
|
* None
|
2015-06-27 02:11:57 +00:00
|
|
|
*
|
|
|
|
* Example:
|
2015-07-13 20:07:21 +00:00
|
|
|
* [[object], ["image"], ["name"], controller, 1] call ace_slideshow_fnc_addSlideActions
|
2015-06-27 02:11:57 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
2015-07-13 20:07:21 +00:00
|
|
|
//#define DEBUG_MODE_FULL
|
2015-06-27 02:11:57 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-07-13 20:07:21 +00:00
|
|
|
PARAMS_5(_objects,_images,_names,_controller,_currentSlideshow);
|
2015-06-27 02:11:57 +00:00
|
|
|
|
2015-07-13 20:07:21 +00:00
|
|
|
private ["_actions"];
|
2015-06-27 02:11:57 +00:00
|
|
|
_actions = [];
|
|
|
|
{
|
|
|
|
_actions pushBack
|
|
|
|
[
|
|
|
|
[
|
2015-07-13 20:07:21 +00:00
|
|
|
format [QGVAR(slideshow%1_slide%2), _currentSlideshow, _forEachIndex + 1],
|
2015-06-27 02:11:57 +00:00
|
|
|
_names select _forEachIndex,
|
|
|
|
"",
|
|
|
|
{
|
2015-07-13 20:07:21 +00:00
|
|
|
EXPLODE_2_PVT(_this select 2,_objects,_image);
|
2015-06-27 02:11:57 +00:00
|
|
|
{
|
2015-07-13 20:07:21 +00:00
|
|
|
_x setObjectTextureGlobal [0, _image]
|
|
|
|
} forEach _objects;
|
2015-06-27 02:11:57 +00:00
|
|
|
},
|
|
|
|
{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;
|
|
|
|
|
2015-07-13 20:07:21 +00:00
|
|
|
TRACE_1("Children actions",_actions);
|
|
|
|
|
2015-06-27 02:11:57 +00:00
|
|
|
_actions
|