Доработка. В процессе. Режим Контроль. Добавить настройку цвета для функциональной схемы
This commit is contained in:
@@ -18,8 +18,8 @@ func _exit_tree() -> void:
|
||||
|
||||
func _on_settings_changed():
|
||||
if not is_inside_tree(): return
|
||||
var white_color = ProjectSettings.get_setting('Схема прибора. Белый цвет', Color.WHITE)
|
||||
var black_color = ProjectSettings.get_setting('Схема прибора. Чёрный цвет', Color.BLACK)
|
||||
var white_color = ProjectSettings.get_setting('Схема прибора. Белый цвет', Color.DIM_GRAY)
|
||||
var black_color = ProjectSettings.get_setting('Схема прибора. Чёрный цвет', Color.CORAL)
|
||||
$pic_functional.material.set('shader_parameter/white', white_color)
|
||||
$pic_functional.material.set('shader_parameter/black', black_color)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=27 format=3 uid="uid://lwmw4egynmd1"]
|
||||
[gd_scene load_steps=26 format=3 uid="uid://lwmw4egynmd1"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://bar8k5qef7kch" path="res://data/УФ.png" id="2_0nvm1"]
|
||||
[ext_resource type="Script" uid="uid://q3gmpsqspjfp" path="res://scenes/контроль/внешний.gd" id="2_8r80x"]
|
||||
@@ -22,7 +22,6 @@
|
||||
[ext_resource type="Texture2D" uid="uid://vdhmga62vjsj" path="res://data/АФСП-РТР.png" id="13_32yvq"]
|
||||
[ext_resource type="Texture2D" uid="uid://dm350ta8noa0v" path="res://data/У-РЭП-РПД-К.png" id="16_32yvq"]
|
||||
[ext_resource type="Texture2D" uid="uid://c3cyog3gy24ft" path="res://data/У-ЭП.png" id="16_gjf0t"]
|
||||
[ext_resource type="Texture2D" uid="uid://cllxcfa130vqu" path="res://data/УА-РЭП.png" id="22_1s34a"]
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_iqgf5"]
|
||||
script/source = "extends Panel
|
||||
@@ -143,6 +142,7 @@ func on_pribor_press(pribor_path, header_text, pribor_node):
|
||||
push_error('экземпляр не создан: \\\"%s\\\" (%s)' % [pribor_path, header_text])
|
||||
return
|
||||
$lbl_header.text = header_text
|
||||
$chk_show_functional.disabled = false
|
||||
var meta_list = pribor_node.get_meta_list()
|
||||
if meta_list.find('unit_name') > -1:
|
||||
var unit_name = pribor_node.get_meta('unit_name')
|
||||
@@ -1568,16 +1568,6 @@ text = "Контроль исправности прибора"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="chk_show_functional" type="CheckButton" parent="lbl_header"]
|
||||
layout_mode = 0
|
||||
offset_left = 972.0
|
||||
offset_top = -1.0
|
||||
offset_right = 1351.0
|
||||
offset_bottom = 33.0
|
||||
theme_override_font_sizes/font_size = 22
|
||||
text = "Показть функциональную схему Э2"
|
||||
flat = true
|
||||
|
||||
[node name="connect_legend0" type="AnimatedSprite2D" parent="."]
|
||||
light_mask = 3
|
||||
position = Vector2(1219, 1151)
|
||||
@@ -1631,15 +1621,16 @@ points = PackedVector2Array(-8, 0, 608, 0)
|
||||
width = 2.0
|
||||
default_color = Color(1, 1, 1, 0.352941)
|
||||
|
||||
[node name="pic_functional" type="TextureRect" parent="."]
|
||||
visible = false
|
||||
[node name="chk_show_functional" type="CheckButton" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = -962.0
|
||||
offset_top = 73.0
|
||||
offset_right = 96.9999
|
||||
offset_bottom = 746.0
|
||||
scale = Vector2(5, 5)
|
||||
texture = ExtResource("22_1s34a")
|
||||
offset_left = 1050.0
|
||||
offset_top = 26.0
|
||||
offset_right = 1429.0
|
||||
offset_bottom = 60.0
|
||||
theme_override_font_sizes/font_size = 22
|
||||
disabled = true
|
||||
text = "Показть функциональную схему Э2"
|
||||
flat = true
|
||||
|
||||
[connection signal="gui_input" from="." to="." method="_on_gui_input"]
|
||||
[connection signal="toggled" from="pribor_prd_n_1" to="pribor_prd_n_1" method="_on_toggled"]
|
||||
@@ -1659,4 +1650,4 @@ texture = ExtResource("22_1s34a")
|
||||
[connection signal="toggled" from="pribor_prd_v_4" to="pribor_prd_v_4" method="_on_toggled"]
|
||||
[connection signal="toggled" from="pribor_prd_n_4" to="pribor_prd_n_4" method="_on_toggled"]
|
||||
[connection signal="toggled" from="pribor_prd_k_4" to="pribor_prd_k_4" method="_on_toggled"]
|
||||
[connection signal="toggled" from="lbl_header/chk_show_functional" to="." method="_on_chk_show_functional_toggled"]
|
||||
[connection signal="toggled" from="chk_show_functional" to="." method="_on_chk_show_functional_toggled"]
|
||||
|
||||
Reference in New Issue
Block a user