ACE3/addons/markers/functions/fnc_onLBSelChangedShape.sqf
PabstMirror 24bba5dea6 Headers
2015-03-27 20:51:30 -05:00

33 lines
639 B
Plaintext

/*
* Author: commy2
* When the shape list box is changed.
*
* Arguments:
* 0: Shape ListBox (idc 1210) <CONTROL>
* 1: Selected Index <NUMBER>
*
* Return Value:
* Nothing
*
* Example:
* [ColorLB, 5] call ace_markers_fnc_onLBSelChangedShape;
*
* Public: No
*/
#include "script_component.hpp"
private ["_data", "_config", "_icon"];
PARAMS_2(_ctrl,_index);
_data = _ctrl lbValue _index;
GVAR(curSelMarkerShape) = _index;
_config = (configfile >> "CfgMarkers") select _data;
_icon = getText (_config >> "icon");
((ctrlParent _ctrl) displayCtrl 102) ctrlSetText _icon;
GVAR(currentMarkerConfigName) = (configName _config);