From e22fba469fcc1dad36ba93dfb836942cdec33f47 Mon Sep 17 00:00:00 2001 From: MaD_CaT Date: Tue, 21 Oct 2025 10:47:37 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D1=80=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D0=BA=D0=B0.=20=D0=A1=D0=B8=D0=BD=D1=8F=D1=8F=20=D1=80=D0=B0?= =?UTF-8?q?=D0=BC=D0=BA=D0=B0=20=D0=B4=D0=BB=D1=8F=20=D1=80=D0=B5=D0=BA?= =?UTF-8?q?=D0=BE=D0=BC=D0=B5=D0=BD=D0=B4=D0=BE=D0=B2=D0=B0=D0=BD=D0=BD?= =?UTF-8?q?=D0=BE=D0=B9=20=D0=BF=D0=BE=D0=BC=D0=B5=D1=85=D0=B8.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scenes/button-flat/button-flat.tscn | 8 ++++++++ scenes/button-flat/nine-patch-button.gd | 2 ++ scenes/grid-buttons-ecm/grid-buttons-ecm.tscn | 2 +- scenes/настройки/настройки.tscn | 9 +++++---- scenes/работа/работа.gd | 6 +++--- scenes/работа/работа.tscn | 4 ++-- 6 files changed, 21 insertions(+), 10 deletions(-) diff --git a/scenes/button-flat/button-flat.tscn b/scenes/button-flat/button-flat.tscn index a35c4c3..607ed5f 100644 --- a/scenes/button-flat/button-flat.tscn +++ b/scenes/button-flat/button-flat.tscn @@ -57,6 +57,14 @@ offset_bottom = 20.0 theme_override_styles/panel = SubResource("1") script = ExtResource("1_ui6sg") +[node name="recommend" type="ReferenceRect" parent="."] +visible = false +z_as_relative = false +layout_mode = 2 +border_color = Color(0, 0.549509, 0.921779, 1) +border_width = 5.0 +editor_only = false + [node name="back" type="Sprite2D" parent="."] material = SubResource("ShaderMaterial_hhdyc") scale = Vector2(20, 20) diff --git a/scenes/button-flat/nine-patch-button.gd b/scenes/button-flat/nine-patch-button.gd index 10a93a2..95a07a4 100644 --- a/scenes/button-flat/nine-patch-button.gd +++ b/scenes/button-flat/nine-patch-button.gd @@ -4,10 +4,12 @@ extends PanelContainer func set_text(val: String): $button.set_text(val) func set_disabled(val: bool): disabled = val +func set_rec_visible(val: bool): $recommend.visible = val func get_text(): return $button.get_text() func is_pressed(): return $button.is_pressed() func is_toggle_mode(): return $button.is_toggle_mode() + var _pressed: = false @export var texture_state0: Texture2D = preload('res://data/кнопка-квадрат-0.png'): diff --git a/scenes/grid-buttons-ecm/grid-buttons-ecm.tscn b/scenes/grid-buttons-ecm/grid-buttons-ecm.tscn index 145ec7a..a1b2522 100644 --- a/scenes/grid-buttons-ecm/grid-buttons-ecm.tscn +++ b/scenes/grid-buttons-ecm/grid-buttons-ecm.tscn @@ -5,7 +5,7 @@ [node name="grd_btns" type="GridContainer"] offset_right = 1096.0 offset_bottom = 54.0 -columns = 15 +columns = 16 [node name="btn_off" parent="." groups=["группа-режим-помехи"] instance=ExtResource("1_oy80h")] layout_mode = 2 diff --git a/scenes/настройки/настройки.tscn b/scenes/настройки/настройки.tscn index 08f80ce..e757390 100644 --- a/scenes/настройки/настройки.tscn +++ b/scenes/настройки/настройки.tscn @@ -67,10 +67,11 @@ const SETTING_TABLE = [ ['уареп-трасса', TableEdit, TableEdit, 'IP-адрес для связи с Трассой [<адрес этого узла>, <адрес удалённого узла>, <порт этого узла>, <порт удалённого узла>]'] ] const EXTERNAL_CU = 16 ## Внешнее целеуказание -const SUPPRESS = 17 ## Строка - Подавление -const KEYBOARD = 18 ## Строка - Виртуальная клавиатура -const HIDE_EMS2 = 19 ## Строка - Скрыть вкладку ЭМС 2 -const COMMIT = 20 ## Строка - Версия УАРЭП +const TRASSA = 17 +const SUPPRESS = 18 ## Строка - Подавление +const KEYBOARD = 19 ## Строка - Виртуальная клавиатура +const HIDE_EMS2 = 20 ## Строка - Скрыть вкладку ЭМС 2 +const COMMIT = 21 ## Строка - Версия УАРЭП var name_to_line_index: = {} ## Для преобразования названия параметра в номер строки diff --git a/scenes/работа/работа.gd b/scenes/работа/работа.gd index fe9aae3..4b79f25 100644 --- a/scenes/работа/работа.gd +++ b/scenes/работа/работа.gd @@ -306,9 +306,9 @@ func on_rto_threat_sel(th_id, ecm_btns): set_btns_disabled(false, btn) var btn_meta = btn.get_meta('rfi_name') if krp == btn_meta: - btn.modulate = Color.DEEP_SKY_BLUE + btn.set_rec_visible(true) else: - btn.modulate = Color(1.0, 1.0, 1.0, 1.0) + btn.set_rec_visible(false) ## Обработчик снятия выбора РТО цели. @@ -320,7 +320,7 @@ func on_rto_threat_unsel(th_id, ecm_btns): break set_ecm_btns_state(true) for btn in ecm_btns: - btn.modulate = Color(1.0, 1.0, 1.0, 1.0) + btn.set_rec_visible(false) ## Обработчик нажатия кнопки "Строб". Управляет отображением строба. diff --git a/scenes/работа/работа.tscn b/scenes/работа/работа.tscn index 006c55c..cb6871f 100644 --- a/scenes/работа/работа.tscn +++ b/scenes/работа/работа.tscn @@ -342,11 +342,11 @@ text = "−" [connection signal="drag_continue" from="." to="." method="_on_drag_continue"] [connection signal="toggled" from="btn_view" to="." method="on_button_view_toggled"] [connection signal="toggled" from="chk_auto" to="." method="on_value_changed"] -[connection signal="toggled" from="btn_activate" to="." method="on_btn_activate"] [connection signal="toggled" from="btn_activate" to="." method="on_btn_activate_toggled"] +[connection signal="toggled" from="btn_activate" to="." method="on_btn_activate"] [connection signal="toggled" from="btn_center" to="." method="on_btn_center_toggled"] [connection signal="button_down" from="zoom_plus" to="tilemap" method="_on_zoom_plus_button_down"] -[connection signal="button_up" from="zoom_plus" to="tilemap" method="_on_zoom_plus_button_up"] [connection signal="button_up" from="zoom_plus" to="tilemap" method="_on_zoom_button_up"] +[connection signal="button_up" from="zoom_plus" to="tilemap" method="_on_zoom_plus_button_up"] [connection signal="button_down" from="zoom_minus" to="tilemap" method="_on_zoom_minus_button_down"] [connection signal="button_up" from="zoom_minus" to="tilemap" method="_on_zoom_button_up"]