Доработка. WIP Добавление элементов для ЭМС-ТГ
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://cymcld4mjmlhj"]
|
||||
[gd_scene load_steps=4 format=3 uid="uid://cymcld4mjmlhj"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://c73tjrn8gr00o" path="res://data/Передатчик.png" id="1_nbmfn"]
|
||||
|
||||
@@ -28,9 +28,16 @@ func _enter_tree() -> void:
|
||||
$label.text = header_text
|
||||
"
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_nbmfn"]
|
||||
bg_color = Color(0.741395, 0.468103, 0.328942, 1)
|
||||
corner_radius_top_left = 4
|
||||
corner_radius_top_right = 4
|
||||
corner_radius_bottom_right = 4
|
||||
corner_radius_bottom_left = 4
|
||||
|
||||
[node name="header-image" type="GridContainer"]
|
||||
offset_right = 91.0
|
||||
offset_bottom = 19.0
|
||||
offset_bottom = 25.0
|
||||
columns = 2
|
||||
script = SubResource("GDScript_63652")
|
||||
|
||||
@@ -43,5 +50,8 @@ expand_mode = 3
|
||||
[node name="label" type="Label" parent="."]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_nbmfn")
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
@@ -25,15 +25,6 @@ func _init() -> void:
|
||||
var style_dark: = style_light.duplicate(true)
|
||||
style_dark.bg_color = Color(0.12, 0.12, 0.12)
|
||||
styles[0] = style_dark
|
||||
ProjectSettings.connect('settings_changed', apply_colors)
|
||||
apply_colors()
|
||||
|
||||
|
||||
func apply_colors():
|
||||
if ProjectSettings.get_setting('application/config/%s' % 'Цвет темы программы', false):
|
||||
add_theme_stylebox_override('normal', styles[1])
|
||||
else:
|
||||
add_theme_stylebox_override('normal', styles[0])
|
||||
"
|
||||
|
||||
[node name="Lable" type="Label"]
|
||||
|
||||
@@ -414,6 +414,7 @@ func _on_focus_entered(node):
|
||||
|
||||
##
|
||||
func set_header(header_types: Array):
|
||||
_assert(header_types.size() > 0, 'количество колонок в заголовке: %d' % [header_types.size()])
|
||||
_assert(header_types.size() < MAX_INDEX, 'количество колонок в заголовке: %d больше допустимого: %d' % [header_types.size(), MAX_INDEX + 1])
|
||||
if columns == 1:
|
||||
set_columns(header_types.size())
|
||||
|
||||
Reference in New Issue
Block a user