Доработка. Коммит перед добавлением кнопки генератора 100 целей.

This commit is contained in:
MaD_CaT
2025-02-11 14:06:29 +03:00
parent d491fe270d
commit d9179ba096
6 changed files with 19 additions and 3 deletions

1
fs.gd
View File

@@ -296,4 +296,3 @@ func on_receive_msg8(data):
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass

View File

@@ -6,6 +6,7 @@ var sock = PacketPeerUDP.new()
@onready var btn_del_threats = get_node('ColorRect/tabs/threats/btn_del')
@onready var btn_save_threats = get_node('ColorRect/tabs/threats/btn_save')
@onready var btn_load_threats = get_node('ColorRect/tabs/threats/btn_load')
@onready var btn_thr_gen = get_node('ColorRect/tabs/threats/thr_gen')
@onready var btn_rotate = get_node('ColorRect/tabs/threats/panel_rotate/btn_rotate')
@onready var entry_rotate = get_node('ColorRect/tabs/threats/panel_rotate/entry_rotate')
@onready var chkbx_rotate = get_node('ColorRect/tabs/threats/panel_rotate/chkbx_rotate')
@@ -19,6 +20,7 @@ func _ready():
'btn_del': btn_del_threats,
'btn_save': btn_save_threats,
'btn_load': btn_load_threats,
'thr_gen': btn_thr_gen,
'btn_rt': btn_rotate,
'entry_rt': entry_rotate,
'chkbx_rt': chkbx_rotate}

View File

@@ -25,12 +25,14 @@ self_modulate = Color(0, 0, 0, 1)
layout_mode = 0
offset_right = 1594.0
offset_bottom = 897.0
current_tab = 0
[node name="threats" type="Panel" parent="ColorRect/tabs"]
self_modulate = Color(0, 0, 0, 1)
light_mask = 2
layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxEmpty_4dilt")
metadata/_tab_index = 0
[node name="table_t" type="GridContainer" parent="ColorRect/tabs/threats"]
layout_mode = 1
@@ -127,9 +129,18 @@ offset_right = 134.0
offset_bottom = 48.0
scale = Vector2(0.8, 0.8)
[node name="thr_gen" type="Button" parent="ColorRect/tabs/threats"]
layout_mode = 0
offset_left = 159.0
offset_top = 6.0
offset_right = 292.0
offset_bottom = 50.0
text = "100 целей"
[node name="pomehi" type="Panel" parent="ColorRect/tabs"]
visible = false
layout_mode = 2
metadata/_tab_index = 1
[node name="table_p" type="GridContainer" parent="ColorRect/tabs/pomehi"]
layout_mode = 0

View File

@@ -12,7 +12,7 @@ config_version=5
config/name="Имитатор ПО КАПС РПБ для МП-1К"
run/main_scene="res://main.tscn"
config/features=PackedStringArray("4.2")
config/features=PackedStringArray("4.3")
config/icon="res://icon.png"
[autoload]

View File

@@ -281,6 +281,7 @@ func init_treats(table, nodes): # Инициализация вкладк
nodes.btn_add.connect('button_up', Callable(self, 'on_btn_add').bind(table))
nodes.btn_del.connect('button_up', Callable(self, 'on_btn_del').bind(table))
nodes.btn_save.connect('button_up', Callable(self, 'on_btn_save'))
nodes.thr_gen.connect('button_up', Callable(self, 'on_thr_gen'))
nodes.btn_load.connect('pressed', Callable(self, 'on_btn_load').bind(table))
nodes.btn_rt.connect('pressed', Callable(self, 'on_rotate_th').bind(nodes.entry_rt, table))
var timer = Timer.new()
@@ -502,3 +503,7 @@ func on_btn_load(table):
treats.erase(cell.text)
table.remove_row(0)
load_treats(table)
func on_thr_gen():
print_debug()

View File

@@ -27,4 +27,3 @@ func check_empty(val):
return false
else:
return true