Доработка. WIP Добавление элементов для ЭМС-ТГ
This commit is contained in:
@@ -1,14 +1,47 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://cymcld4mjmlhj"]
|
||||
[gd_scene load_steps=3 format=3 uid="uid://cymcld4mjmlhj"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://c73tjrn8gr00o" path="res://data/Передатчик.png" id="1_nbmfn"]
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_63652"]
|
||||
script/source = "extends GridContainer
|
||||
|
||||
@export var header_text: String:
|
||||
set(val):
|
||||
header_text = val
|
||||
if is_inside_tree():
|
||||
$label.text = val
|
||||
get:
|
||||
return header_text
|
||||
|
||||
|
||||
@export_file var image_file: String:
|
||||
set(val):
|
||||
image_file = val
|
||||
if is_inside_tree():
|
||||
$image.texture = load(val)
|
||||
get:
|
||||
return image_file
|
||||
|
||||
|
||||
func _enter_tree() -> void:
|
||||
$image.texture = load(image_file)
|
||||
$label.text = header_text
|
||||
"
|
||||
|
||||
[node name="header-image" type="GridContainer"]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
offset_right = 91.0
|
||||
offset_bottom = 19.0
|
||||
columns = 2
|
||||
script = SubResource("GDScript_63652")
|
||||
|
||||
[node name="image" type="TextureRect" parent="."]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
texture = ExtResource("1_nbmfn")
|
||||
expand_mode = 3
|
||||
|
||||
[node name="label" type="Label" parent="."]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
Reference in New Issue
Block a user