ACE3/addons/markers/functions/fnc_onSliderPosChangedAngle.sqf

31 lines
605 B
Plaintext
Raw Normal View History

#include "script_component.hpp"
2015-03-28 01:51:30 +00:00
/*
* Author: commy2
* Angle Slider Pos changed
*
* Arguments:
* 0: Slider (idc 1210) <CONTROL>
* 1: Slider Data (angle: -180..180) <NUMBER>
*
* Return Value:
2015-08-22 12:08:35 +00:00
* None
2015-03-28 01:51:30 +00:00
*
* Example:
* [Slider, 2] call ace_markers_fnc_onSliderPosChangedAngle;
*
* Public: No
*/
2015-08-22 12:08:35 +00:00
params ["_ctrl", "_data"];
2015-08-23 19:25:41 +00:00
TRACE_2("params",_ctrl,_data);
2015-12-10 14:32:31 +00:00
private _direction = round _data;
if (_direction < 0) then {
2015-01-18 16:17:06 +00:00
_direction = _direction + 360;
};
2015-05-28 19:59:04 +00:00
((ctrlParent _ctrl) displayCtrl 1221) ctrlSetText format [localize LSTRING(MarkerDirection), _direction];
2015-01-18 16:17:06 +00:00
GVAR(currentMarkerAngle) = _data;