From 1065d2055323e0d5d87cc9c9a0011c9aa3bde116 Mon Sep 17 00:00:00 2001 From: Maxim Date: Fri, 13 Dec 2024 16:14:51 +0300 Subject: [PATCH] add mode ems g --- PRD_MP550.tscn | 103 +++++++++++++++++++-------------------- ems_g.gd | 81 +++++++++++++++++++++++++++--- scripts/PRD.gd | 15 ++---- scripts/constants.gd | 65 ++++++++++++------------ scripts/switch.gd | 11 +++++ table/node.tscn | 15 +++--- table/socket_status.tscn | 23 ++++++--- table/switch.tscn | 26 ++++++++-- 8 files changed, 220 insertions(+), 119 deletions(-) create mode 100644 scripts/switch.gd diff --git a/PRD_MP550.tscn b/PRD_MP550.tscn index 9c3232b..5d795e2 100644 --- a/PRD_MP550.tscn +++ b/PRD_MP550.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=54 format=3 uid="uid://cvor2jm4xk3ha"] +[gd_scene load_steps=47 format=3 uid="uid://cvor2jm4xk3ha"] [ext_resource type="Script" path="res://scripts/PRD.gd" id="1_v273n"] [ext_resource type="Script" path="res://table/table.gd" id="2_vmbyo"] @@ -12,28 +12,29 @@ [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_eib3t"] bg_color = Color(0.356863, 0.278431, 0.356863, 1) +border_width_bottom = 6 +border_color = Color(0.228592, 0.173062, 0.22863, 1) +border_blend = true [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_o0too"] bg_color = Color(0.223529, 0.168627, 0.223529, 1) +border_width_bottom = 6 +border_color = Color(0.339047, 0.26316, 0.339004, 1) +border_blend = true -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_dm3xa"] -bg_color = Color(0.224534, 0.169766, 0.224571, 1) +[sub_resource type="Image" id="Image_6t3ka"] +data = { +"data": PackedByteArray(255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 42, 42, 42, 12, 26, 26, 26, 67, 26, 26, 26, 105, 27, 27, 27, 122, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 27, 27, 27, 122, 26, 26, 26, 105, 27, 27, 27, 66, 46, 46, 46, 11, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 29, 29, 29, 44, 27, 27, 27, 122, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 27, 27, 27, 122, 30, 30, 30, 42, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 29, 29, 29, 44, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 80, 80, 80, 144, 147, 147, 147, 173, 170, 170, 170, 186, 170, 170, 170, 186, 146, 146, 146, 173, 78, 78, 78, 144, 26, 26, 26, 128, 26, 26, 26, 128, 30, 30, 30, 42, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 42, 42, 42, 12, 27, 27, 27, 122, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 117, 117, 117, 159, 180, 180, 180, 192, 180, 180, 180, 192, 180, 180, 180, 192, 180, 180, 180, 192, 180, 180, 180, 192, 180, 180, 180, 192, 115, 115, 115, 159, 26, 26, 26, 128, 27, 27, 27, 121, 46, 46, 46, 11, 255, 255, 255, 0, 255, 255, 255, 0, 26, 26, 26, 67, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 80, 80, 80, 144, 180, 180, 180, 192, 180, 180, 180, 192, 180, 180, 180, 192, 180, 180, 180, 192, 180, 180, 180, 192, 180, 180, 180, 192, 180, 180, 180, 192, 179, 179, 179, 191, 76, 76, 76, 143, 26, 26, 26, 128, 27, 27, 27, 65, 255, 255, 255, 0, 255, 255, 255, 0, 26, 26, 26, 105, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 147, 147, 147, 173, 180, 180, 180, 192, 180, 180, 180, 192, 180, 180, 180, 192, 180, 180, 180, 192, 180, 180, 180, 192, 180, 180, 180, 192, 180, 180, 180, 192, 180, 180, 180, 192, 146, 146, 146, 173, 26, 26, 26, 128, 27, 27, 27, 104, 255, 255, 255, 0, 255, 255, 255, 0, 27, 27, 27, 122, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 170, 170, 170, 186, 180, 180, 180, 192, 180, 180, 180, 192, 180, 180, 180, 192, 180, 180, 180, 192, 180, 180, 180, 192, 180, 180, 180, 192, 180, 180, 180, 192, 180, 180, 180, 192, 170, 170, 170, 186, 26, 26, 26, 128, 27, 27, 27, 122, 255, 255, 255, 0, 255, 255, 255, 0, 27, 27, 27, 122, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 170, 170, 170, 186, 180, 180, 180, 192, 180, 180, 180, 192, 180, 180, 180, 192, 180, 180, 180, 192, 180, 180, 180, 192, 180, 180, 180, 192, 180, 180, 180, 192, 180, 180, 180, 192, 170, 170, 170, 185, 26, 26, 26, 128, 27, 27, 27, 121, 255, 255, 255, 0, 255, 255, 255, 0, 26, 26, 26, 105, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 146, 146, 146, 173, 180, 180, 180, 192, 180, 180, 180, 192, 180, 180, 180, 192, 180, 180, 180, 192, 180, 180, 180, 192, 180, 180, 180, 192, 180, 180, 180, 192, 180, 180, 180, 192, 145, 145, 145, 172, 26, 26, 26, 128, 27, 27, 27, 103, 255, 255, 255, 0, 255, 255, 255, 0, 27, 27, 27, 66, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 78, 78, 78, 144, 180, 180, 180, 192, 180, 180, 180, 192, 180, 180, 180, 192, 180, 180, 180, 192, 180, 180, 180, 192, 180, 180, 180, 192, 180, 180, 180, 192, 179, 179, 179, 191, 76, 76, 76, 143, 26, 26, 26, 128, 27, 27, 27, 65, 255, 255, 255, 0, 255, 255, 255, 0, 46, 46, 46, 11, 27, 27, 27, 122, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 115, 115, 115, 159, 179, 179, 179, 191, 180, 180, 180, 192, 180, 180, 180, 192, 180, 180, 180, 192, 180, 180, 180, 192, 179, 179, 179, 191, 115, 115, 115, 158, 26, 26, 26, 128, 27, 27, 27, 121, 51, 51, 51, 10, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 30, 30, 30, 42, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 76, 76, 76, 143, 146, 146, 146, 173, 170, 170, 170, 186, 170, 170, 170, 185, 145, 145, 145, 172, 76, 76, 76, 143, 26, 26, 26, 128, 26, 26, 26, 128, 31, 31, 31, 41, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 30, 30, 30, 42, 27, 27, 27, 121, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 27, 27, 27, 121, 31, 31, 31, 41, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 46, 46, 46, 11, 27, 27, 27, 65, 27, 27, 27, 104, 27, 27, 27, 122, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 26, 26, 26, 128, 27, 27, 27, 121, 27, 27, 27, 103, 27, 27, 27, 65, 51, 51, 51, 10, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0), +"format": "RGBA8", +"height": 16, +"mipmaps": false, +"width": 32 +} -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_h7n4k"] -content_margin_left = 6.0 -content_margin_top = 5.0 -content_margin_right = 6.0 -content_margin_bottom = 5.0 -bg_color = Color(0.356863, 0.278431, 0.356863, 1) -border_color = Color(0.1155, 0.132, 0.1595, 1) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 -corner_detail = 3 -anti_aliasing = false +[sub_resource type="ImageTexture" id="ImageTexture_3u7xk"] +image = SubResource("Image_6t3ka") -[sub_resource type="Image" id="Image_ye5as"] +[sub_resource type="Image" id="Image_wqspx"] data = { "data": PackedByteArray(255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 18, 255, 255, 255, 100, 255, 255, 255, 156, 255, 255, 255, 183, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 183, 255, 255, 255, 156, 255, 255, 255, 99, 255, 255, 255, 17, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 65, 255, 255, 255, 183, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 182, 255, 255, 255, 63, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 65, 255, 255, 255, 191, 255, 255, 255, 191, 184, 184, 184, 207, 81, 81, 81, 237, 43, 43, 43, 249, 43, 43, 43, 249, 81, 81, 81, 236, 186, 186, 186, 207, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 63, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 18, 255, 255, 255, 183, 255, 255, 255, 191, 126, 126, 126, 223, 26, 26, 26, 255, 26, 26, 26, 255, 26, 26, 26, 255, 26, 26, 26, 255, 26, 26, 26, 255, 26, 26, 26, 255, 129, 129, 129, 222, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 181, 255, 255, 255, 16, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 100, 255, 255, 255, 191, 184, 184, 184, 207, 26, 26, 26, 255, 26, 26, 26, 255, 26, 26, 26, 255, 26, 26, 26, 255, 26, 26, 26, 255, 26, 26, 26, 255, 26, 26, 26, 255, 27, 27, 27, 255, 187, 187, 187, 206, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 97, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 156, 255, 255, 255, 191, 81, 81, 81, 237, 26, 26, 26, 255, 26, 26, 26, 255, 26, 26, 26, 255, 26, 26, 26, 255, 26, 26, 26, 255, 26, 26, 26, 255, 26, 26, 26, 255, 26, 26, 26, 255, 82, 82, 82, 236, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 155, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 183, 255, 255, 255, 191, 43, 43, 43, 249, 26, 26, 26, 255, 26, 26, 26, 255, 26, 26, 26, 255, 26, 26, 26, 255, 26, 26, 26, 255, 26, 26, 26, 255, 26, 26, 26, 255, 26, 26, 26, 255, 43, 43, 43, 249, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 182, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 183, 255, 255, 255, 191, 43, 43, 43, 249, 26, 26, 26, 255, 26, 26, 26, 255, 26, 26, 26, 255, 26, 26, 26, 255, 26, 26, 26, 255, 26, 26, 26, 255, 26, 26, 26, 255, 26, 26, 26, 255, 44, 44, 44, 249, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 181, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 156, 255, 255, 255, 191, 81, 81, 81, 236, 26, 26, 26, 255, 26, 26, 26, 255, 26, 26, 26, 255, 26, 26, 26, 255, 26, 26, 26, 255, 26, 26, 26, 255, 26, 26, 26, 255, 26, 26, 26, 255, 83, 83, 83, 236, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 154, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 99, 255, 255, 255, 191, 186, 186, 186, 207, 26, 26, 26, 255, 26, 26, 26, 255, 26, 26, 26, 255, 26, 26, 26, 255, 26, 26, 26, 255, 26, 26, 26, 255, 26, 26, 26, 255, 27, 27, 27, 255, 188, 188, 188, 206, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 97, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 182, 255, 255, 255, 191, 129, 129, 129, 222, 27, 27, 27, 255, 26, 26, 26, 255, 26, 26, 26, 255, 26, 26, 26, 255, 26, 26, 26, 255, 27, 27, 27, 255, 130, 130, 130, 221, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 180, 255, 255, 255, 15, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 63, 255, 255, 255, 191, 255, 255, 255, 191, 187, 187, 187, 206, 82, 82, 82, 236, 43, 43, 43, 249, 44, 44, 44, 249, 83, 83, 83, 236, 188, 188, 188, 206, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 61, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 63, 255, 255, 255, 181, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 180, 255, 255, 255, 61, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 16, 255, 255, 255, 97, 255, 255, 255, 155, 255, 255, 255, 182, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 191, 255, 255, 255, 181, 255, 255, 255, 154, 255, 255, 255, 97, 255, 255, 255, 15, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0), "format": "RGBA8", @@ -43,40 +44,26 @@ data = { } [sub_resource type="ImageTexture" id="ImageTexture_7imsd"] -image = SubResource("Image_ye5as") - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_w1th4"] -bg_color = Color(0.00176745, 0.0018535, 0.00195493, 1) - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_jd0we"] -bg_color = Color(0, 0, 0, 1) - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_qeshs"] -bg_color = Color(0, 0, 0, 1) - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_l3dyq"] -bg_color = Color(0, 0, 0, 1) - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_bvo7a"] -bg_color = Color(0, 0, 0, 1) +image = SubResource("Image_wqspx") [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_gooip"] -bg_color = Color(0, 0, 0, 1) +bg_color = Color(0.223529, 0.168627, 0.223529, 0.490196) [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_lqhgx"] -bg_color = Color(0, 0, 0, 1) +bg_color = Color(0, 0, 0, 0.490196) [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_148rs"] -bg_color = Color(0, 0, 0, 1) - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_i0vx1"] -bg_color = Color(0.782378, 0.411862, 0.935049, 1) +bg_color = Color(0, 0, 0, 0.490196) +border_width_bottom = 4 +border_color = Color(0.223529, 0.168627, 0.223529, 1) +border_blend = true +corner_radius_top_left = 2 +corner_radius_top_right = 2 +corner_radius_bottom_right = 2 +corner_radius_bottom_left = 2 [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ldbvf"] -bg_color = Color(0, 0, 0, 1) - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_cfhjb"] -bg_color = Color(0.0811369, 0.690685, 0.641033, 1) +bg_color = Color(0.223529, 0.168627, 0.223529, 0.490196) [sub_resource type="StyleBoxTexture" id="StyleBoxTexture_h8aei"] @@ -89,21 +76,15 @@ bg_color = Color(0.0811369, 0.690685, 0.641033, 1) [sub_resource type="Theme" id="Theme_k5ur4"] Button/styles/focus = SubResource("StyleBoxFlat_eib3t") Button/styles/hover = SubResource("StyleBoxFlat_o0too") -Button/styles/normal = SubResource("StyleBoxFlat_dm3xa") -Button/styles/pressed = SubResource("StyleBoxFlat_h7n4k") +Button/styles/normal = SubResource("StyleBoxFlat_o0too") +Button/styles/pressed = SubResource("StyleBoxFlat_eib3t") +CheckButton/icons/checked = SubResource("ImageTexture_3u7xk") CheckButton/icons/unchecked = SubResource("ImageTexture_7imsd") -CheckButton/styles/focus = SubResource("StyleBoxFlat_w1th4") -CheckButton/styles/hover = SubResource("StyleBoxFlat_jd0we") -CheckButton/styles/hover_pressed = SubResource("StyleBoxFlat_qeshs") -CheckButton/styles/normal = SubResource("StyleBoxFlat_l3dyq") -CheckButton/styles/pressed = SubResource("StyleBoxFlat_bvo7a") OptionButton/font_sizes/font_size = 17 OptionButton/styles/focus = SubResource("StyleBoxFlat_gooip") OptionButton/styles/hover = SubResource("StyleBoxFlat_lqhgx") OptionButton/styles/normal = SubResource("StyleBoxFlat_148rs") -OptionButton/styles/normal_mirrored = SubResource("StyleBoxFlat_i0vx1") OptionButton/styles/pressed = SubResource("StyleBoxFlat_ldbvf") -OptionButton/styles/pressed_mirrored = SubResource("StyleBoxFlat_cfhjb") TabContainer/styles/panel = SubResource("StyleBoxTexture_h8aei") TabContainer/styles/tab_focus = SubResource("StyleBoxTexture_d322q") TabContainer/styles/tab_selected = SubResource("StyleBoxTexture_8j02b") @@ -204,6 +185,7 @@ offset_bottom = 988.0 color = Color(0.586231, 0.481877, 0.585869, 1) [node name="select_prd" type="Button" parent="Background/side_panel"] +layout_mode = 0 offset_top = 120.0 offset_right = 216.0 offset_bottom = 156.0 @@ -216,6 +198,7 @@ button_pressed = true text = "ПРД" [node name="select_control" type="Button" parent="Background/side_panel"] +layout_mode = 0 offset_top = 160.0 offset_right = 216.0 offset_bottom = 196.0 @@ -227,6 +210,7 @@ toggle_mode = true text = "КОНТРОЛЬ" [node name="select_ems_g" type="Button" parent="Background/side_panel"] +layout_mode = 0 offset_top = 200.0 offset_right = 216.0 offset_bottom = 236.0 @@ -296,6 +280,7 @@ metadata/_edit_lock_ = true [node name="Controlpanel" type="ColorRect" parent="TabContainer/ControlPanel"] visible = false +layout_mode = 0 offset_left = 216.0 offset_top = 40.0 offset_right = 1867.0 @@ -343,6 +328,7 @@ metadata/_tab_index = 1 metadata/_edit_lock_ = true [node name="scroll1" type="ScrollContainer" parent="TabContainer/PRD"] +layout_mode = 0 offset_left = 969.0 offset_top = 27.0 offset_right = 1332.0 @@ -354,6 +340,7 @@ script = ExtResource("2_vmbyo") metadata/_edit_lock_ = true [node name="scroll2" type="ScrollContainer" parent="TabContainer/PRD"] +layout_mode = 0 offset_left = 969.0 offset_top = 331.0 offset_right = 1332.0 @@ -365,6 +352,7 @@ script = ExtResource("2_vmbyo") metadata/_edit_lock_ = true [node name="LABEL" type="Label" parent="TabContainer/PRD"] +layout_mode = 0 offset_left = 482.0 offset_top = 17.0 offset_right = 764.0 @@ -372,6 +360,7 @@ offset_bottom = 40.0 text = "ЛИТЕРА 2! ПРД-Н!" [node name="Zapret" type="Button" parent="TabContainer/PRD"] +layout_mode = 0 offset_left = 482.0 offset_top = 45.0 offset_right = 600.0 @@ -384,6 +373,7 @@ text = " Запрет СИ2" metadata/litera = 48 [node name="LABEL2" type="Label" parent="TabContainer/PRD"] +layout_mode = 0 offset_left = 482.0 offset_top = 329.0 offset_right = 764.0 @@ -391,6 +381,7 @@ offset_bottom = 352.0 text = "ЛИТЕРА 3! ПРД-Н!" [node name="Zapret2" type="Button" parent="TabContainer/PRD"] +layout_mode = 0 offset_left = 482.0 offset_top = 357.0 offset_right = 600.0 @@ -403,6 +394,7 @@ text = " Запрет СИ3" metadata/litera = 49 [node name="Label_luch" type="Label" parent="TabContainer/PRD"] +layout_mode = 0 offset_left = 482.0 offset_top = 100.0 offset_right = 764.0 @@ -410,6 +402,7 @@ offset_bottom = 123.0 text = "Номер и направление луча" [node name="LUCH" type="OptionButton" parent="TabContainer/PRD"] +layout_mode = 0 offset_left = 482.0 offset_top = 132.0 offset_right = 600.0 @@ -420,6 +413,7 @@ popup/item_1/text = "Что-то" popup/item_1/id = 1 [node name="Modul" type="Label" parent="TabContainer/PRD"] +layout_mode = 0 offset_left = 482.0 offset_top = 402.0 offset_right = 626.0 @@ -427,6 +421,7 @@ offset_bottom = 425.0 text = "Модуляция" [node name="DKM2" type="Label" parent="TabContainer/PRD"] +layout_mode = 0 offset_left = 482.0 offset_top = 183.0 offset_right = 624.0 @@ -434,6 +429,7 @@ offset_bottom = 206.0 text = "ДКМ ДОУ 2" [node name="DKM3" type="Label" parent="TabContainer/PRD"] +layout_mode = 0 offset_left = 482.0 offset_top = 431.0 offset_right = 624.0 @@ -441,6 +437,7 @@ offset_bottom = 454.0 text = "ДКМ ДОУ 3" [node name="FGOZ2" type="Label" parent="TabContainer/PRD"] +layout_mode = 0 offset_left = 482.0 offset_top = 206.0 offset_right = 655.0 @@ -448,6 +445,7 @@ offset_bottom = 229.0 text = "ФГОЗ 2" [node name="FGOZ3" type="Label" parent="TabContainer/PRD"] +layout_mode = 0 offset_left = 482.0 offset_top = 454.0 offset_right = 655.0 @@ -511,6 +509,7 @@ texture = SubResource("GradientTexture2D_0pk2o") metadata/_edit_lock_ = true [node name="select_dev" type="ScrollContainer" parent="TabContainer/PRD"] +layout_mode = 0 offset_left = 12.0 offset_top = 64.0 offset_right = 375.0 diff --git a/ems_g.gd b/ems_g.gd index e67e3be..be1a197 100644 --- a/ems_g.gd +++ b/ems_g.gd @@ -1,6 +1,7 @@ extends Panel var node_select1: Node var shift: int = 2 +var input_status: Dictionary = {} func _ready() -> void: @@ -11,7 +12,6 @@ func _ready() -> void: for out_colum in Constants.OUT_EMS_G.size()+shift: if out_colum > 1 and i_row ==0: column.append(Constants.TableList) - elif out_colum > 1 and i_row > 2: column.append(Constants.Switch) elif (out_colum == 1 and i_row > 2) or (out_colum > 1 and i_row == 2): @@ -22,26 +22,33 @@ func _ready() -> void: draw_tabl(node_select1, EMS_G_TABLE, EMS_G_TABLE.size()) - node_select1.get_node2(1, 1).text = 'x3 : OUT' - node_select1.get_node2(0, 2).text = 'x3 : IN' + node_select1.get_node2(1, 1).text = 'x3_OUT:GND' + node_select1.get_node2(0, 2).text = 'x3_IN:GND' for i in Constants.INPUT_EMS_G.size(): node_select1.get_node2(0, i+shift+1).text = Constants.INPUT_EMS_G[i] for i in Constants.OUT_EMS_G.size(): - node_select1.get_node2(i+shift, 1).text = Constants.OUT_EMS_G[i] + node_select1.get_node2(i+shift, 1).text = Constants.OUT_EMS_G[i][1] for i in EMS_G_TABLE[0].size()-shift: var list = node_select1.get_node2(i+shift, 0) + list.set_meta('device', Constants.OUT_EMS_G[i][0]) + list.connect('item_selected', Callable(self, 'on_mode_link').bind(list)) for k in Constants.OUT_x128.size(): list.add_item(Constants.OUT_x128[k]) - + var columns_min_size: Array for i in EMS_G_TABLE[0].size(): - columns_min_size.append(70) + if i < 2: + columns_min_size.append(110) + else: + columns_min_size.append(80) node_select1.set_columns_min_size(columns_min_size) Network.connect('_yau_receive', Callable(self, '_on_data_received')) + create_link_button(node_select1, 3, 19, 2, 18) + func draw_tabl(tbl, row: Array, count_row: int): for i_row in count_row: @@ -73,8 +80,68 @@ func _on_data_received(data_from_yau_07): set_frame(socket_status, Constants.Frame.WORK) -func _process(delta: float) -> void: +func _process(_delta: float) -> void: pass func set_frame(node: Node, val: int): node.set_frame(val) + + +func set_init(): + pass + + +## Создает связь между кнопками +func create_link_button(node, count_rows_sart: int, count_rows_end: int, coln_start: int, coln_end: int): + ## META_EMS_G[[Номер входа, Номер выхода]] + var META_EMS_G: Array = [] + for i_row in 16: + var INPUT = 1 + var OUTPUT = 47 + for i_colum in 16: + META_EMS_G.append([INPUT+i_row, OUTPUT+i_colum]) + input_status[OUTPUT+i_colum] = 0 + + var count_register = 0 + for i_row in range(count_rows_sart, count_rows_end): + for i_col in range (coln_start, coln_end): + var chk_node = node.get_node2(i_col, i_row) + var chk_btn = chk_node.get_child(1, false) + chk_btn.connect('toggled', Callable(self, 'on_btn_connect').bind(chk_node, chk_btn)) + chk_btn.set_meta('device', META_EMS_G[count_register]) + count_register += 1 + + +func on_mode_link(mode, list): + ## Формирование команды для выбора устройства + var meta = list.get_meta('device') + var address_port_wr = 0x122 + var ports_wr: Dictionary = {address_port_wr : meta} + Network.send_array.append(ports_wr) # Отправка команды + + ## Формирование команды для отправкы команды на устройство + ports_wr = {} + address_port_wr = 0x128 + ports_wr[address_port_wr] = 0x0000 if mode == 0 else 0x2000 if mode == 1 else 0x4000 if mode == 2 else 0x8000 + Network.send_array.append(ports_wr) + + +func on_btn_connect(toggled_on: bool, chk_node: Node, chk_btn: Node): + ## Формирование команды для выбора устройства + var meta = chk_btn.get_meta('device') + var address_port_wr = 0x122 + var ports_wr: Dictionary = {address_port_wr : meta[1]} + Network.send_array.append(ports_wr) # Отправка команды + ## Формирование команды для отправкы команды на устройство + var color_chk_btn = chk_node.get_child(0, false) + if toggled_on: + color_chk_btn.color = Color.WEB_GREEN + input_status[meta[1]] += 1 << meta[0]-1 + else: + color_chk_btn.color = Color.BLACK + input_status[meta[1]] -= 1 << meta[0]-1 + + ports_wr = {} + address_port_wr = 0x124 + ports_wr[address_port_wr] = input_status[meta[1]] + Network.send_array.append(ports_wr) diff --git a/scripts/PRD.gd b/scripts/PRD.gd index 5f71d80..1a63811 100644 --- a/scripts/PRD.gd +++ b/scripts/PRD.gd @@ -70,6 +70,9 @@ func _on_yau_status(yau_status): func _on_read_isa(unit_isa_ports): + var isa: Array = [] + for i in unit_isa_ports: + isa.append('%x: %x' % [i, unit_isa_ports[i]]) $ISA.text = 'ISA: ' + str(unit_isa_ports) @@ -79,7 +82,7 @@ func draw_tabl(tbl, row: Array, count_row: int): tbl.add_row(row[i_row]) -func _process(delta: float) -> void: +func _process(_delta: float) -> void: pass @@ -201,16 +204,6 @@ func _on_data_received(data_from_yau_07): func set_frame(node: Node, val: int): node.set_frame(val) -#func dec2bin(decimal_value, number_bit): - #var binary_string = '' - #var count = number_bit - #while(count >= 0): - #var temp: int = decimal_value >> count - #binary_string += '%d' % (temp & 1) - #count -= 1 - #return binary_string - - func _on_prd_select() -> void: $TabContainer.current_tab = 1 $Background/side_panel/select_prd.button_pressed = true diff --git a/scripts/constants.gd b/scripts/constants.gd index 12c15d9..56eece9 100644 --- a/scripts/constants.gd +++ b/scripts/constants.gd @@ -68,44 +68,45 @@ const EMS_G: Array = [ ['Нет Х3:14(Модуляция)', 'Есть Х3:14(Модуляция)'], ['Нет Х3:27(ФГОЗ)', 'Есть Х3:27(ФГОЗ)']] const INPUT_EMS_G: Array = [ - '01/:34', - '02/:35', - '03/:36', - '04/:37', - '05/:38', - '06/:39', - '07/:40', - '08/:41', - '18/:42', - '19/:43', - '20/:44', - '21/:45', - '22/:46', - '23/:47', - '24/:48', - '25/:49',] + '01 :34', + '02 :35', + '03 :36', + '04 :37', + '05 :38', + '06 :39', + '07 :40', + '08 :41', + '18 :42', + '19 :43', + '20 :44', + '21 :45', + '22 :46', + '23 :47', + '24 :48', + '25 :49',] const OUT_EMS_G: Array = [ - '10/:34', - '11/:35', - '12/:36', - '13/:37', - '14/:38', - '15/:39', - '16/:40', - '17/:41', - '26/:42', - '27/:43', - '28/:44', - '29/:45', - '30/:46', - '31/:47', - '32/:48', - '33/:49',] + [47, '10 :34'], + [48, '11 :35'], + [49, '12 :36'], + [50, '13 :37'], + [51, '14 :38'], + [52, '15 :39'], + [53, '16 :40'], + [54, '17 :41'], + [55, '26 :42'], + [56, '27 :43'], + [57, '28 :44'], + [58, '29 :45'], + [59, '30 :46'], + [60, '31 :47'], + [61, '32 :48'], + [62, '33 :49']] const OUT_x128 = [ 'Р', 'К', '0', '1',] +## [Номер входа, Номер выхода] enum MODE { PRD_K, diff --git a/scripts/switch.gd b/scripts/switch.gd new file mode 100644 index 0000000..0255434 --- /dev/null +++ b/scripts/switch.gd @@ -0,0 +1,11 @@ +extends PanelContainer + + +func _ready() -> void: + var style = get('theme_override_styles/panel') + style.bg_color = Color(0, 0, 0, 0.5) + set('theme_override_styles/panel', style) + + +func _process(delta: float) -> void: + pass diff --git a/table/node.tscn b/table/node.tscn index 4fa8f81..7a4b8f4 100644 --- a/table/node.tscn +++ b/table/node.tscn @@ -1,10 +1,13 @@ -[gd_scene load_steps=3 format=3 uid="uid://cef6gtuc60ggg"] +[gd_scene load_steps=2 format=3 uid="uid://cef6gtuc60ggg"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_q1ixs"] -bg_color = Color(0, 0, 0, 1) - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_hrhif"] -bg_color = Color(0, 0, 0, 1) +bg_color = Color(0, 0, 0, 0.490196) +border_width_bottom = 2 +border_color = Color(0.223529, 0.168627, 0.223529, 1) +corner_radius_top_left = 3 +corner_radius_top_right = 3 +corner_radius_bottom_right = 3 +corner_radius_bottom_left = 3 [node name="Label" type="LineEdit"] texture_filter = 2 @@ -26,7 +29,7 @@ mouse_default_cursor_shape = 0 theme_override_colors/font_uneditable_color = Color(1, 1, 1, 1) theme_override_font_sizes/font_size = 17 theme_override_styles/read_only = SubResource("StyleBoxFlat_q1ixs") -theme_override_styles/normal = SubResource("StyleBoxFlat_hrhif") +theme_override_styles/normal = SubResource("StyleBoxFlat_q1ixs") alignment = 1 editable = false caret_blink = true diff --git a/table/socket_status.tscn b/table/socket_status.tscn index 739ba3f..74732cb 100644 --- a/table/socket_status.tscn +++ b/table/socket_status.tscn @@ -4,8 +4,14 @@ [ext_resource type="Texture2D" uid="uid://b15flrfytxkop" path="res://эмс-бланк-пост.png" id="2_b2kjm"] [ext_resource type="Texture2D" uid="uid://ijdfo2mml54" path="res://эмс-бланк-перем.png" id="3_odpjv"] -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_jkmds"] -bg_color = Color(0, 0, 0, 1) +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_q1ixs"] +bg_color = Color(0, 0, 0, 0.490196) +border_width_bottom = 2 +border_color = Color(0.223529, 0.168627, 0.223529, 1) +corner_radius_top_left = 3 +corner_radius_top_right = 3 +corner_radius_bottom_right = 3 +corner_radius_bottom_left = 3 [sub_resource type="SpriteFrames" id="SpriteFrames_a7q1i"] animations = [{ @@ -28,11 +34,14 @@ animations = [{ }] [node name="PanelContainer" type="PanelContainer"] -offset_right = 73.0 -offset_bottom = 38.0 -theme_override_styles/panel = SubResource("StyleBoxFlat_jkmds") +offset_left = -3.0 +offset_right = 319.0 +offset_bottom = 66.0 +theme_override_styles/panel = SubResource("StyleBoxFlat_q1ixs") +metadata/_edit_lock_ = true [node name="SZI_x" type="AnimatedSprite2D" parent="."] -position = Vector2(35, 11) -scale = Vector2(0.777778, 0.777778) +position = Vector2(40, 11) +scale = Vector2(1.2, 1.2) sprite_frames = SubResource("SpriteFrames_a7q1i") +metadata/_edit_lock_ = true diff --git a/table/switch.tscn b/table/switch.tscn index b7e38c3..ac71999 100644 --- a/table/switch.tscn +++ b/table/switch.tscn @@ -1,14 +1,32 @@ -[gd_scene load_steps=2 format=3 uid="uid://dhg1syshfaem2"] +[gd_scene load_steps=7 format=3 uid="uid://dhg1syshfaem2"] -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_kwqxa"] -bg_color = Color(0, 0, 0, 1) +[ext_resource type="Script" path="res://scripts/switch.gd" id="1_h0k6p"] + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_r5cym"] + +[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_b6sp7"] + +[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_bc33d"] + +[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_46fou"] + +[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_o64tc"] [node name="PanelContainer" type="PanelContainer"] offset_right = 186.0 offset_bottom = 40.0 -theme_override_styles/panel = SubResource("StyleBoxFlat_kwqxa") +theme_override_styles/panel = SubResource("StyleBoxFlat_r5cym") +script = ExtResource("1_h0k6p") + +[node name="ColorRect" type="ColorRect" parent="."] +layout_mode = 2 +color = Color(0, 0, 0, 0.490196) [node name="CheckButton" type="CheckButton" parent="."] layout_mode = 2 size_flags_horizontal = 4 mouse_default_cursor_shape = 2 +theme_override_styles/focus = SubResource("StyleBoxTexture_b6sp7") +theme_override_styles/hover = SubResource("StyleBoxTexture_bc33d") +theme_override_styles/pressed = SubResource("StyleBoxTexture_46fou") +theme_override_styles/normal = SubResource("StyleBoxTexture_o64tc")