Доработка. [PATCH] отладка контроля, изменение индикации режима Тренаж
This commit is contained in:
8
scenes/tabs-switch/lbl_ready.gd
Normal file
8
scenes/tabs-switch/lbl_ready.gd
Normal file
@@ -0,0 +1,8 @@
|
||||
extends Label
|
||||
|
||||
func _ready() -> void:
|
||||
var prd_dict = prd.prd_dict
|
||||
|
||||
for prd_module in prd_dict.values(): ## Отправка команды на исполнение в ПРД
|
||||
print('prd_module.unit_yau07.online: ', prd_module.unit_yau07.online)
|
||||
pass
|
||||
1
scenes/tabs-switch/lbl_ready.gd.uid
Normal file
1
scenes/tabs-switch/lbl_ready.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://b5ykwyk5vpi6
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=15 format=3 uid="uid://3slb0i3pvowc"]
|
||||
[gd_scene load_steps=20 format=3 uid="uid://3slb0i3pvowc"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bvo6tcreqyuex" path="res://scenes/tabs-switch/tab-switch.gd" id="1_fg0vd"]
|
||||
[ext_resource type="PackedScene" uid="uid://b276iygic5itk" path="res://scenes/работа/работа.tscn" id="2_u7p16"]
|
||||
@@ -7,6 +7,8 @@
|
||||
[ext_resource type="PackedScene" uid="uid://dab6loryocc73" path="res://scenes/эмс/эмс.tscn" id="5_u71bh"]
|
||||
[ext_resource type="PackedScene" uid="uid://bnptm4rlp60dq" path="res://scenes/настройки/настройки.tscn" id="6_i8iv3"]
|
||||
[ext_resource type="PackedScene" uid="uid://musb21x2u0xs" path="res://scenes/эмс2/эмс2.tscn" id="6_rsg03"]
|
||||
[ext_resource type="Script" uid="uid://b5ykwyk5vpi6" path="res://scenes/tabs-switch/lbl_ready.gd" id="8_tidwt"]
|
||||
[ext_resource type="Script" uid="uid://roajn6c6wvc1" path="res://scenes/tabs-switch/тренаж_режим.gd" id="9_41d34"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_tidwt"]
|
||||
|
||||
@@ -20,6 +22,15 @@
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_o1r22"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_nmdfd"]
|
||||
bg_color = Color(0.061, 100, 0.051, 1)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_cw2ss"]
|
||||
bg_color = Color(0.473976, 0.473976, 0.473976, 1)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_41d34"]
|
||||
bg_color = Color(0.39, 100, 0.327, 1)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_imu1q"]
|
||||
|
||||
[node name="panel" type="Panel"]
|
||||
@@ -81,6 +92,7 @@ theme_override_styles/normal = SubResource("StyleBoxFlat_o1r22")
|
||||
text = "Исправно"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
script = ExtResource("8_tidwt")
|
||||
|
||||
[node name="remote_control" type="Label" parent="."]
|
||||
visible = false
|
||||
@@ -104,10 +116,16 @@ offset_right = 1501.0
|
||||
offset_bottom = 27.0
|
||||
tooltip_text = "Задействовать режим Тренаж"
|
||||
focus_mode = 0
|
||||
theme_override_colors/font_hover_pressed_color = Color(0, 0, 0, 1)
|
||||
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||
theme_override_colors/font_pressed_color = Color(0, 0, 0, 1)
|
||||
theme_override_styles/hover_pressed = SubResource("StyleBoxFlat_nmdfd")
|
||||
theme_override_styles/hover = SubResource("StyleBoxFlat_cw2ss")
|
||||
theme_override_styles/pressed = SubResource("StyleBoxFlat_41d34")
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_imu1q")
|
||||
toggle_mode = true
|
||||
text = "Тренаж"
|
||||
script = ExtResource("9_41d34")
|
||||
|
||||
[connection signal="tab_changed" from="tab_switch" to="tab_switch" method="_on_tab_changed"]
|
||||
[connection signal="toggled" from="тренаж_режим" to="tab_switch" method="_on_button_trenaj_toggled"]
|
||||
|
||||
11
scenes/tabs-switch/тренаж_режим.gd
Normal file
11
scenes/tabs-switch/тренаж_режим.gd
Normal file
@@ -0,0 +1,11 @@
|
||||
extends Button
|
||||
|
||||
func _ready():
|
||||
connect("toggled", Callable(self, "_on_button_toggled"))
|
||||
|
||||
|
||||
func _on_button_toggled(mode: bool):
|
||||
if mode:
|
||||
tooltip_text = "Режим \"Тренаж\" задействован"
|
||||
else:
|
||||
tooltip_text = "Задейстовать режим \"Тренаж\""
|
||||
1
scenes/tabs-switch/тренаж_режим.gd.uid
Normal file
1
scenes/tabs-switch/тренаж_режим.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://roajn6c6wvc1
|
||||
Reference in New Issue
Block a user