2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2023-07-25 06:30:49 +00:00
|
|
|
#include "..\defines.hpp"
|
|
|
|
/*
|
|
|
|
* Author: Brett Mayson
|
2024-01-16 15:30:27 +00:00
|
|
|
* Handles the previous / next page buttons for actions.
|
2023-07-25 06:30:49 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Arsenal display <DISPLAY>
|
2024-01-16 15:30:27 +00:00
|
|
|
* 1: Actions page <CONTROL>
|
|
|
|
* 2: Previous (false) or next (true) page <BOOL>
|
2023-07-25 06:30:49 +00:00
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
|
|
|
params ["_display", "_control", "_nextPage"];
|
|
|
|
|
2024-02-05 17:04:24 +00:00
|
|
|
TRACE_1("control enabled",ctrlEnabled _control);
|
2023-07-25 06:30:49 +00:00
|
|
|
if !(ctrlEnabled _control) exitWith {};
|
|
|
|
|
|
|
|
GVAR(currentActionPage) = GVAR(currentActionPage) + ([-1, 1] select _nextPage);
|
|
|
|
|
|
|
|
GVAR(actionsInfo) params ["_panelControl", "_curSel", "_itemCfg"];
|
2024-01-16 15:30:27 +00:00
|
|
|
|
2023-07-25 06:30:49 +00:00
|
|
|
[QGVAR(displayActions), [_display, _panelControl, _curSel, _itemCfg]] call CBA_fnc_localEvent;
|