2015-03-28 01:51:30 +00:00
|
|
|
/*
|
|
|
|
* Author: commy2
|
|
|
|
* When the shape list box is changed.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Shape ListBox (idc 1210) <CONTROL>
|
|
|
|
* 1: Selected Index <NUMBER>
|
|
|
|
*
|
|
|
|
* Return Value:
|
2015-08-22 12:08:35 +00:00
|
|
|
* None
|
2015-03-28 01:51:30 +00:00
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [ColorLB, 5] call ace_markers_fnc_onLBSelChangedShape;
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
2015-01-18 16:17:06 +00:00
|
|
|
#include "script_component.hpp"
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-08-22 12:08:35 +00:00
|
|
|
params ["_ctrl", "_index"];
|
2015-08-23 19:25:41 +00:00
|
|
|
TRACE_2("params",_ctrl,_index);
|
|
|
|
|
2015-12-10 14:32:31 +00:00
|
|
|
private _data = _ctrl lbValue _index;
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-03-28 01:51:30 +00:00
|
|
|
GVAR(curSelMarkerShape) = _index;
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2016-01-01 02:27:26 +00:00
|
|
|
private _config = (configFile >> "CfgMarkers") select _data;
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-12-10 14:32:31 +00:00
|
|
|
GVAR(currentMarkerConfigName) = configName _config;
|
2016-06-02 14:28:52 +00:00
|
|
|
|
|
|
|
//Set map display to same shape:
|
|
|
|
private _bisShapeLB = switch (false) do {
|
|
|
|
case (isNull findDisplay 12): {(findDisplay 12) displayCtrl 1091};
|
|
|
|
case (isNull findDisplay 52): {(findDisplay 52) displayCtrl 1091};
|
|
|
|
case (isNull findDisplay 53): {(findDisplay 53) displayCtrl 1091};
|
|
|
|
case (isNull findDisplay 37): {(findDisplay 37) displayCtrl 1091};
|
|
|
|
default {controlNull};
|
|
|
|
};
|
|
|
|
if (_ctrl != _bisShapeLB) then { //Don't set what we got a EH from
|
|
|
|
_bisShapeLB lbSetCurSel GVAR(curSelMarkerShape);
|
|
|
|
};
|