From 1ac97c14fbb3d2f927070a863eeaa4697c2ea382 Mon Sep 17 00:00:00 2001 From: MaD_CaT Date: Tue, 15 Aug 2023 14:13:09 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5.=20=D0=98=D1=81=D0=BF=D1=80=D0=B0?= =?UTF-8?q?=D0=B2=D0=BB=D0=B5=D0=BD=D0=B0=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D1=8B=20=D0=B2=D1=8B=D0=BF=D0=B0=D0=B4=D0=B0=D1=8E=D1=89=D0=B5?= =?UTF-8?q?=D0=B3=D0=BE=20=D0=BC=D0=B5=D0=BD=D1=8E.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.tscn | 18 +++++++++--------- threats.gd | 5 +++-- кнопка-4.tscn | 8 ++++---- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/main.tscn b/main.tscn index 8693154..26fc0a7 100644 --- a/main.tscn +++ b/main.tscn @@ -1,12 +1,12 @@ [gd_scene load_steps=5 format=3 uid="uid://87gtvqd7bbje"] -[ext_resource type="Script" path="res://main.gd" id="1_o7op8"] -[ext_resource type="Script" path="res://table/table.gd" id="2_nv8t5"] -[ext_resource type="Texture2D" uid="uid://cex4jiu1pcj3x" path="res://edit-add-0.png" id="3_g7h67"] -[ext_resource type="Texture2D" uid="uid://cx746np1wexnd" path="res://edit-add-1.png" id="4_75pij"] +[ext_resource type="Script" path="res://main.gd" id="1_s3ohn"] +[ext_resource type="Script" path="res://table/table.gd" id="2_vjhtn"] +[ext_resource type="Texture2D" uid="uid://cex4jiu1pcj3x" path="res://edit-add-0.png" id="3_2ohxr"] +[ext_resource type="Texture2D" uid="uid://cx746np1wexnd" path="res://edit-add-1.png" id="4_i0tam"] [node name="main" type="Node2D"] -script = ExtResource("1_o7op8") +script = ExtResource("1_s3ohn") [node name="tabs" type="TabContainer" parent="."] offset_right = 1594.0 @@ -26,7 +26,7 @@ offset_right = 1.0 offset_bottom = 10.0 grow_horizontal = 2 grow_vertical = 2 -script = ExtResource("2_nv8t5") +script = ExtResource("2_vjhtn") node_type_file = "res://ячейка-1.tscn" [node name="btn_add" type="TextureButton" parent="tabs/threats"] @@ -35,8 +35,8 @@ offset_left = 1533.0 offset_top = -2.0 offset_right = 1581.0 offset_bottom = 46.0 -texture_normal = ExtResource("3_g7h67") -texture_pressed = ExtResource("4_75pij") +texture_normal = ExtResource("3_2ohxr") +texture_pressed = ExtResource("4_i0tam") [node name="btn_del" type="TextureButton" parent="tabs/threats"] layout_mode = 0 @@ -54,5 +54,5 @@ layout_mode = 0 offset_top = 100.0 offset_right = 1587.0 offset_bottom = 861.0 -script = ExtResource("2_nv8t5") +script = ExtResource("2_vjhtn") node_type_file = "res://ячейка-1.tscn" diff --git a/threats.gd b/threats.gd index 3dffceb..2882083 100644 --- a/threats.gd +++ b/threats.gd @@ -296,8 +296,8 @@ func init_opt_btns(row : int, table): func on_item_selected(item_num, node): - var optbtn_text = node.text - var indexis = g_table.get_key_indexes(node.name) + var optbtn_text = node[0].text + var indexis = g_table.get_key_indexes(node[0].name) var row_i = indexis[1] var col_i = indexis[0] var cell = g_table.get_node2(0,row_i) @@ -397,5 +397,6 @@ func get_threats_data(): var data = treats[key].get_data() data_to_json['mis'].append(data) var json = JSON.new().stringify(data_to_json) + print_debug(json) var pac = json.to_utf8_buffer() return pac diff --git a/кнопка-4.tscn b/кнопка-4.tscn index ba3d67d..508aa8f 100644 --- a/кнопка-4.tscn +++ b/кнопка-4.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=3 format=3 uid="uid://ccxre8mwhndjk"] -[ext_resource type="Texture2D" uid="uid://dag8n0gknjwak" path="res://индикатор-1-0.png" id="1_1mkdt"] -[ext_resource type="Texture2D" uid="uid://b3ext3w4ftgg2" path="res://индикатор-1-1.png" id="2_21ih5"] +[ext_resource type="Texture2D" uid="uid://dag8n0gknjwak" path="res://индикатор-1-0.png" id="1_qvf8a"] +[ext_resource type="Texture2D" uid="uid://b3ext3w4ftgg2" path="res://индикатор-1-1.png" id="2_1f6tt"] [node name="indicator_1" type="TextureButton"] modulate = Color(1, 0.596078, 0.4, 1) @@ -9,5 +9,5 @@ offset_right = 35.0 offset_bottom = 29.0 toggle_mode = true button_mask = 0 -texture_normal = ExtResource("1_1mkdt") -texture_pressed = ExtResource("2_21ih5") +texture_normal = ExtResource("1_qvf8a") +texture_pressed = ExtResource("2_1f6tt")