2016-04-08 20:21:46 +00:00
|
|
|
/*
|
|
|
|
Author: Raimonds Virtoss - EpochMod.com
|
|
|
|
|
|
|
|
Contributors: Aaron Clark
|
|
|
|
|
|
|
|
Description:
|
|
|
|
TODO: DESC-TBA
|
|
|
|
|
|
|
|
Licence:
|
|
|
|
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
|
|
|
|
|
|
|
|
Github:
|
2016-06-13 16:54:19 +00:00
|
|
|
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/gui/scripts/EPOCH_InterruptConfigActions.sqf
|
2016-04-08 20:21:46 +00:00
|
|
|
*/
|
2015-10-05 18:40:04 +00:00
|
|
|
disableSerialization;
|
2016-09-01 00:29:08 +00:00
|
|
|
//[[[cog import generate_private_arrays ]]]
|
|
|
|
private ["_data","_display","_group","_mainGrp","_mainGrpPos","_pos","_value","_width"];
|
|
|
|
//[[[end]]]
|
2015-10-05 18:40:04 +00:00
|
|
|
params ["_ctrl","_idx"];
|
|
|
|
|
|
|
|
_mainGrp = Epoch_interrupt_controls select 1;
|
|
|
|
_display = ctrlParent _mainGrp;
|
|
|
|
_data = _ctrl lbData _idx;
|
|
|
|
_value = _ctrl lbValue _idx;
|
|
|
|
|
|
|
|
Epoch_interrupt_index = _idx;
|
|
|
|
_mainGrpPos = ctrlPosition _mainGrp;
|
|
|
|
//_mainGrpPos set [0,Epoch_interrupt_offset]; //convert to global if having problems with x pos
|
|
|
|
|
|
|
|
ctrlDelete _mainGrp;
|
|
|
|
|
|
|
|
_mainGrp = _display ctrlCreate ["Epoch_main_config_group",_value];
|
|
|
|
_mainGrp ctrlSetPosition _mainGrpPos;
|
|
|
|
_mainGrp ctrlCommit 0;
|
|
|
|
|
|
|
|
_group = _display ctrlCreate [_data, _value + 1, _mainGrp];
|
|
|
|
|
2016-04-08 20:21:46 +00:00
|
|
|
_width = (ctrlPosition _group) select 2;
|
2015-10-05 18:40:04 +00:00
|
|
|
Epoch_interrupt_controls set [1, _mainGrp];
|
|
|
|
|
|
|
|
{
|
|
|
|
_pos = ctrlPosition _x;
|
|
|
|
_pos set [2,_width];
|
|
|
|
_x ctrlSetPosition _pos;
|
|
|
|
_x ctrlCommit 0;
|
|
|
|
} forEach Epoch_interrupt_controls;
|
|
|
|
|
|
|
|
ctrlSetFocus _mainGrp;
|
|
|
|
|
|
|
|
true
|