Исправление. Исправлена работы выпадающего меню.
This commit is contained in:
18
main.tscn
18
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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user