get markers to work

This commit is contained in:
commy2 2015-01-19 16:59:00 +01:00
parent 1c37c76cc6
commit e55a85cc26
4 changed files with 193 additions and 193 deletions

View File

@ -2,10 +2,10 @@
#include "script_component.hpp" #include "script_component.hpp"
// recieve remote marker data // recieve remote marker data
[QGVAR(setMarkerNetwork), FUNC(setMarkerNetwork)] call EFUNC(common,addEventHandler); [QGVAR(setMarkerNetwork), {_this call DFUNC(setMarkerNetwork)}] call EFUNC(common,addEventHandler);
// recieve marker data for JIP // recieve marker data for JIP
[QGVAR(setMarkerJIP), FUNC(setMarkerJIP)] call EFUNC(common,addEventHandler); [QGVAR(setMarkerJIP), {_this call DFUNC(setMarkerJIP)}] call EFUNC(common,addEventHandler);
// request marker data for JIP // request marker data for JIP
if (isMultiplayer && {!isServer} && {hasInterface}) then { if (isMultiplayer && {!isServer} && {hasInterface}) then {

View File

@ -4,8 +4,6 @@
#define BORDER 0.005 #define BORDER 0.005
[{ [{
with uinamespace do {
disableserialization; disableserialization;
_display = _this select 0; _display = _this select 0;
@ -33,8 +31,9 @@
ctrlSetFocus _text; ctrlSetFocus _text;
//Change ok button's text based on current channel //Change ok button's text based on current channel
if (isNull _buttonOK) exitWith {true}; //if (isNull _buttonOK) exitWith {true};
_channel = "";
_textColor = [1,1,1,1]; _textColor = [1,1,1,1];
switch (call EFUNC(common,currentChannel)) do { switch (call EFUNC(common,currentChannel)) do {
case ("global"): { case ("global"): {
@ -153,7 +152,7 @@
_shape ctrlAddEventHandler ["LBSelChanged", {_this call FUNC(onLBSelChangedShape)}]; _shape ctrlAddEventHandler ["LBSelChanged", {_this call FUNC(onLBSelChangedShape)}];
_curSelShape = GETMVAR(curSelMarkerShape,0); _curSelShape = GETGVAR(curSelMarkerShape,0);
_shape lbSetCurSel _curSelShape; _shape lbSetCurSel _curSelShape;
_data = _shape lbValue _curSelShape; _data = _shape lbValue _curSelShape;
_config = (configfile >> "CfgMarkers") select _data; _config = (configfile >> "CfgMarkers") select _data;
@ -170,7 +169,7 @@
_color ctrlAddEventHandler ["LBSelChanged", {_this call FUNC(onLBSelChangedColor)}]; _color ctrlAddEventHandler ["LBSelChanged", {_this call FUNC(onLBSelChangedColor)}];
_curSelColor = GETMVAR(curSelMarkerColor,0); _curSelColor = GETGVAR(curSelMarkerColor,0);
_color lbSetCurSel _curSelColor; _color lbSetCurSel _curSelColor;
_data = _color lbValue _curSelColor; _data = _color lbValue _curSelColor;
_config = (configfile >> "CfgMarkerColors") select _data; _config = (configfile >> "CfgMarkerColors") select _data;
@ -187,7 +186,7 @@
_angle sliderSetRange [-180, 180]; _angle sliderSetRange [-180, 180];
_angle ctrlAddEventHandler ["SliderPosChanged", {_this call FUNC(onSliderPosChangedAngle)}]; _angle ctrlAddEventHandler ["SliderPosChanged", {_this call FUNC(onSliderPosChangedAngle)}];
_curSelAngle = GETMVAR(curSelMarkerAngle,0); _curSelAngle = GETGVAR(curSelMarkerAngle,0);
_angle sliderSetPosition _curSelAngle; _angle sliderSetPosition _curSelAngle;
_curSelAngle = round _curSelAngle; _curSelAngle = round _curSelAngle;
@ -197,5 +196,4 @@
_angleText ctrlSetText format [localize "STR_ACE_Markers_MarkerDirection", _curSelAngle]; _angleText ctrlSetText format [localize "STR_ACE_Markers_MarkerDirection", _curSelAngle];
};
}, _this] call EFUNC(common,execNextFrame); }, _this] call EFUNC(common,execNextFrame);

View File

@ -30,11 +30,13 @@ if (_this select 1 == 1) then {
[ [
{ {
["setMarkerNetwork", [ [QGVAR(setMarkerNetwork), [
GETMVAR(currentMarkerShape,0), allMapMarkers select (count allMapMarkers - 1), [
GETMVAR(currentMarkerColor,0), GETGVAR(currentMarkerShape,0),
GETGVAR(currentMarkerColor,0),
_this, _this,
GETMVAR(currentMarkerAngle,0) GETGVAR(currentMarkerAngle,0)
]
]] call EFUNC(common,globalEvent); ]] call EFUNC(common,globalEvent);
}, },

View File

@ -6,8 +6,8 @@ private "_logic";
_logic = _this; _logic = _this;
[QGVAR(setMarkerJIP), _logic, [ [QGVAR(setMarkerJIP), _logic, [
GETMVAR(allMapMarkers,[]), GETGVAR(allMapMarkers,[]),
GETMVAR(allMapMarkersProperties,[]), GETGVAR(allMapMarkersProperties,[]),
_logic _logic
] ]
] call EFUNC(common,targetEvent); ] call EFUNC(common,targetEvent);