Added initial zeus core config module function

This commit is contained in:
Valmo Trindade
2025-05-14 05:07:29 -03:00
parent 5231dae17a
commit 25549cda25
2 changed files with 50 additions and 51 deletions

View File

@@ -47,7 +47,7 @@ class armatak_zeus_core_module_dialog {
y = "0.346 * safezoneH + safezoneY"; y = "0.346 * safezoneH + safezoneY";
w = "0.237187 * safezoneW"; w = "0.237187 * safezoneW";
h = "0.275 * safezoneH"; 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 class armatak_gui_module_zeus_core_dialog_address_text: RscText
{ {
@@ -58,9 +58,18 @@ class armatak_zeus_core_module_dialog {
w = "0.216563 * safezoneW"; w = "0.216563 * safezoneW";
h = "0.044 * safezoneH"; 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 class armatak_gui_module_zeus_core_dialog_address_edit: RscEdit
{ {
idc = 1400; idc = 14000;
text = "localhost"; text = "localhost";
x = "0.396875 * safezoneW + safezoneX"; x = "0.396875 * safezoneW + safezoneX";
y = "0.401 * safezoneH + safezoneY"; y = "0.401 * safezoneH + safezoneY";
@@ -68,18 +77,9 @@ class armatak_zeus_core_module_dialog {
h = "0.044 * safezoneH"; h = "0.044 * safezoneH";
tooltip = "Address without protocol prefix of the TAK Server (localhost, 192.168.1.1, etcetera...)"; 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 class armatak_gui_module_zeus_core_dialog_address_port_edit: RscEdit
{ {
idc = 1401; idc = 14001;
text = "8088"; text = "8088";
x = "0.396875 * safezoneW + safezoneX"; x = "0.396875 * safezoneW + safezoneX";
y = "0.489 * safezoneH + safezoneY"; y = "0.489 * safezoneH + safezoneY";
@@ -90,6 +90,7 @@ class armatak_zeus_core_module_dialog {
{ {
idc = 1600; idc = 1600;
text = "OK"; text = "OK";
action = "call armatak_fnc_ZeusCoreModule_configure;";
x = "0.5 * safezoneW + safezoneX"; x = "0.5 * safezoneW + safezoneX";
y = "0.555 * safezoneH + safezoneY"; y = "0.555 * safezoneH + safezoneY";
w = "0.0515625 * safezoneW"; w = "0.0515625 * safezoneW";
@@ -99,6 +100,7 @@ class armatak_zeus_core_module_dialog {
{ {
idc = 1601; idc = 1601;
text = "Cancel"; text = "Cancel";
action = "closeDialog 2;";
x = "0.561875 * safezoneW + safezoneX"; x = "0.561875 * safezoneW + safezoneX";
y = "0.555 * safezoneH + safezoneY"; y = "0.555 * safezoneH + safezoneY";
w = "0.0515625 * safezoneW"; w = "0.0515625 * safezoneW";

View File

@@ -1,30 +1,28 @@
disableSerialization;
_armatak_tcp_socket_is_running = missionNamespace getVariable "armatak_tcp_socket_is_running"; _warning = format ["<t color='#FF8021'>ARMATAK</t><br/> %1", "Connecting to TAK Server TCP Socket..."];
[[_warning, 1.5]] call CBA_fnc_notify;
if (isNil _armatak_tcp_socket_is_running) exitWith { call armatak_fnc_handleCallbacks;
_warning = format ["<t color='#FF8021'>ARMATAK</t><br/> %1", "Connecting to TAK Server TCP Socket..."];
[[_warning, 1.5]] call CBA_fnc_notify;
call armatak_fnc_handleCallbacks; _tak_server_instance_address = ctrlText 14000;
_tak_server_instance_port = ctrlText 14001;
_tak_server_instance_address = ctrlText 1400; _tak_server_fulladdress = ((_tak_server_instance_address) + ":" + (str _tak_server_instance_port));
_tak_server_instance_port = ctrlText 1401;
_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]; "armatak" callExtension ["tcp_socket:start", [_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]]; _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"; _syncedUnits = missionNamespace getVariable "armatak_marked_units";
{ {
@@ -48,7 +46,6 @@ if (isNil _armatak_tcp_socket_is_running) exitWith {
[_x] call armatak_fnc_send_digital_pointer_cot; [_x] call armatak_fnc_send_digital_pointer_cot;
}; };
} forEach _syncedUnits; } forEach _syncedUnits;
}, 2, []] call CBA_fnc_addPerFrameHandler; }, 2, []] call CBA_fnc_addPerFrameHandler;
};
true; closeDialog 1;