diff --git a/addons/main/dialog.hpp b/addons/main/dialog.hpp
index d490887..c8ae8e0 100644
--- a/addons/main/dialog.hpp
+++ b/addons/main/dialog.hpp
@@ -47,7 +47,7 @@ class armatak_zeus_core_module_dialog {
y = "0.346 * safezoneH + safezoneY";
w = "0.237187 * safezoneW";
h = "0.275 * safezoneH";
- colorBackground[] = {1,1,1,0.5};
+ colorBackground[] = {0,0,0,1};
};
class armatak_gui_module_zeus_core_dialog_address_text: RscText
{
@@ -58,9 +58,18 @@ class armatak_zeus_core_module_dialog {
w = "0.216563 * safezoneW";
h = "0.044 * safezoneH";
};
+ class armatak_gui_module_zeus_core_dialog_address_port_text: RscText
+ {
+ idc = 1001;
+ text = "TAK Server Port";
+ x = "0.402031 * safezoneW + safezoneX";
+ y = "0.445 * safezoneH + safezoneY";
+ w = "0.216563 * safezoneW";
+ h = "0.044 * safezoneH";
+ };
class armatak_gui_module_zeus_core_dialog_address_edit: RscEdit
{
- idc = 1400;
+ idc = 14000;
text = "localhost";
x = "0.396875 * safezoneW + safezoneX";
y = "0.401 * safezoneH + safezoneY";
@@ -68,18 +77,9 @@ class armatak_zeus_core_module_dialog {
h = "0.044 * safezoneH";
tooltip = "Address without protocol prefix of the TAK Server (localhost, 192.168.1.1, etcetera...)";
};
- class armatak_gui_module_zeus_core_dialog_address_port_text: RscText
- {
- idc = 1001;
- text = "TAK Server Port";
- x = "0.391719 * safezoneW + safezoneX";
- y = "0.445 * safezoneH + safezoneY";
- w = "0.221719 * safezoneW";
- h = "0.044 * safezoneH";
- };
class armatak_gui_module_zeus_core_dialog_address_port_edit: RscEdit
{
- idc = 1401;
+ idc = 14001;
text = "8088";
x = "0.396875 * safezoneW + safezoneX";
y = "0.489 * safezoneH + safezoneY";
@@ -90,6 +90,7 @@ class armatak_zeus_core_module_dialog {
{
idc = 1600;
text = "OK";
+ action = "call armatak_fnc_ZeusCoreModule_configure;";
x = "0.5 * safezoneW + safezoneX";
y = "0.555 * safezoneH + safezoneY";
w = "0.0515625 * safezoneW";
@@ -99,6 +100,7 @@ class armatak_zeus_core_module_dialog {
{
idc = 1601;
text = "Cancel";
+ action = "closeDialog 2;";
x = "0.561875 * safezoneW + safezoneX";
y = "0.555 * safezoneH + safezoneY";
w = "0.0515625 * safezoneW";
diff --git a/addons/main/functions/gui/fn_ZeusCoreModule_configure.sqf b/addons/main/functions/gui/fn_ZeusCoreModule_configure.sqf
index 1d14825..59b307f 100644
--- a/addons/main/functions/gui/fn_ZeusCoreModule_configure.sqf
+++ b/addons/main/functions/gui/fn_ZeusCoreModule_configure.sqf
@@ -1,54 +1,51 @@
+disableSerialization;
-_armatak_tcp_socket_is_running = missionNamespace getVariable "armatak_tcp_socket_is_running";
+_warning = format ["ARMATAK
%1", "Connecting to TAK Server TCP Socket..."];
+[[_warning, 1.5]] call CBA_fnc_notify;
-if (isNil _armatak_tcp_socket_is_running) exitWith {
- _warning = format ["ARMATAK
%1", "Connecting to TAK Server TCP Socket..."];
- [[_warning, 1.5]] call CBA_fnc_notify;
+call armatak_fnc_handleCallbacks;
- call armatak_fnc_handleCallbacks;
+_tak_server_instance_address = ctrlText 14000;
+_tak_server_instance_port = ctrlText 14001;
- _tak_server_instance_address = ctrlText 1400;
- _tak_server_instance_port = ctrlText 1401;
+_tak_server_fulladdress = ((_tak_server_instance_address) + ":" + (str _tak_server_instance_port));
- _tak_server_fulladdress = _tak_server_instance_address + ":" + (str _tak_server_instance_port);
+missionNamespace setVariable ["armatak_server_instance", _tak_server_fulladdress];
+missionNamespace setVariable ["armatak_tcp_socket_is_running", true];
+missionNamespace setVariable ["armatak_group_colors", ["White", "Yellow", "Orange", "Magenta", "Red", "Maroon", "Purple", "DarkBlue", "Blue", "Cyan", "Teal", "Green", "DarkGreen", "Brown"]];
- missionNamespace setVariable ["armatak_server_instance", _tak_server_fulladdress];
- missionNamespace setVariable ["armatak_tcp_socket_is_running", true];
- missionNamespace setVariable ["armatak_group_colors", ["White", "Yellow", "Orange", "Magenta", "Red", "Maroon", "Purple", "DarkBlue", "Blue", "Cyan", "Teal", "Green", "DarkGreen", "Brown"]];
+"armatak" callExtension ["tcp_socket:start", [_tak_server_fulladdress]];
- "armatak" callExtension ["tcp_socket:start", [_tak_server_fulladdress]];
+_syncUnits = [];
- _syncUnits = synchronizedObjects _logic;
+missionNamespace setVariable ["armatak_marked_units", _syncUnits];
- missionNamespace setVariable ["armatak_marked_units", _syncUnits];
+_syncedUnits = missionNamespace getVariable "armatak_marked_units";
+[{
_syncedUnits = missionNamespace getVariable "armatak_marked_units";
- [{
- _syncedUnits = missionNamespace getVariable "armatak_marked_units";
+ {
+ _objectType = _x call BIS_fnc_objectType;
+ if ((_objectType select 0) == "Soldier") then {
+ _callsign = [_x] call armatak_fnc_extract_unit_callsign;
+ _group_name = [group _x] call armatak_fnc_extract_group_color;
+ _group_role = [_x] call armatak_fnc_extract_group_role;
- {
- _objectType = _x call BIS_fnc_objectType;
- if ((_objectType select 0) == "Soldier") then {
- _callsign = [_x] call armatak_fnc_extract_unit_callsign;
- _group_name = [group _x] call armatak_fnc_extract_group_color;
- _group_role = [_x] call armatak_fnc_extract_group_role;
+ [_x, _callsign, _group_name, _group_role] call armatak_fnc_send_eud_cot;
+ [_x] call armatak_fnc_send_digital_pointer_cot;
+ };
+ if ((_objectType select 0) == "Vehicle") then {
+ _atak_type = [_x] call armatak_fnc_extract_role;
+ _callsign = [_x] call armatak_fnc_extract_marker_callsign;
- [_x, _callsign, _group_name, _group_role] call armatak_fnc_send_eud_cot;
- [_x] call armatak_fnc_send_digital_pointer_cot;
- };
- if ((_objectType select 0) == "Vehicle") then {
- _atak_type = [_x] call armatak_fnc_extract_role;
- _callsign = [_x] call armatak_fnc_extract_marker_callsign;
+ [_x, _atak_type, _callsign] call armatak_fnc_send_marker_cot;
+ };
+ if (unitIsUAV _x) then {
+ [_x] call armatak_fnc_send_drone_cot;
+ [_x] call armatak_fnc_send_digital_pointer_cot;
+ };
+ } forEach _syncedUnits;
+}, 2, []] call CBA_fnc_addPerFrameHandler;
- [_x, _atak_type, _callsign] call armatak_fnc_send_marker_cot;
- };
- if (unitIsUAV _x) then {
- [_x] call armatak_fnc_send_drone_cot;
- [_x] call armatak_fnc_send_digital_pointer_cot;
- };
- } forEach _syncedUnits;
- }, 2, []] call CBA_fnc_addPerFrameHandler;
-};
-
-true;
\ No newline at end of file
+closeDialog 1;
\ No newline at end of file