blocks level

This commit is contained in:
Dana 2025-08-27 13:46:22 +03:00
commit 0bc952900a
6 changed files with 112 additions and 12 deletions

View file

@ -16,8 +16,8 @@ config/icon="res://icon.svg"
[display]
window/size/viewport_width=1920
window/size/viewport_height=1080
window/size/viewport_width=1280
window/size/viewport_height=720
[dotnet]

View file

@ -2,18 +2,26 @@
[ext_resource type="Script" uid="uid://dody51xll2hpa" path="res://scripts/blocks_programm/block.gd" id="1_i1xsu"]
[node name="block" type="Label"]
[node name="block" type="TextureButton"]
z_index = 1
anchors_preset = -1
anchor_right = 0.034
anchor_bottom = 0.033
offset_right = -0.280006
offset_bottom = 0.360001
offset_bottom = 12.24
grow_vertical = 2
script = ExtResource("1_i1xsu")
[node name="Label" type="Label" parent="."]
layout_mode = 1
anchors_preset = 9
anchor_bottom = 1.0
offset_right = 1.0
grow_vertical = 2
theme_override_colors/font_color = Color(0, 0, 0, 1)
theme_override_font_sizes/font_size = 26
script = ExtResource("1_i1xsu")
[node name="ColorRect" type="ColorRect" parent="."]
[node name="ColorRect" type="ColorRect" parent="Label"]
z_index = -1
layout_mode = 1
anchors_preset = 15
@ -21,3 +29,5 @@ anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[connection signal="pressed" from="." to="." method="_on_pressed"]

View file

@ -3,7 +3,9 @@
[ext_resource type="PackedScene" uid="uid://kwnkl36mvngk" path="res://scenes/blocks/block.tscn" id="1_2lap5"]
[node name="step" instance=ExtResource("1_2lap5")]
[node name="Label" parent="." index="0"]
text = "Шаг"
[node name="ColorRect" parent="." index="0"]
color = Color(0.743766, 0.427688, 0.505481, 1)
[node name="ColorRect" parent="Label" index="0"]
color = Color(0.749863, 0.458329, 0.573161, 1)

View file

@ -3,7 +3,9 @@
[ext_resource type="PackedScene" uid="uid://kwnkl36mvngk" path="res://scenes/blocks/block.tscn" id="1_1mv7a"]
[node name="turn" instance=ExtResource("1_1mv7a")]
[node name="Label" parent="." index="0"]
text = "Поворот"
[node name="ColorRect" parent="." index="0"]
color = Color(0.351402, 0.701966, 0.379117, 1)
[node name="ColorRect" parent="Label" index="0"]
color = Color(0.488761, 0.618423, 0.534197, 1)

View file

@ -0,0 +1,79 @@
[gd_scene load_steps=3 format=3 uid="uid://bv4rxfc4hm6t7"]
[ext_resource type="PackedScene" uid="uid://bv27o64fwb1l1" path="res://scenes/blocks/step.tscn" id="1_0rak5"]
[ext_resource type="PackedScene" uid="uid://r3u4855s3sbq" path="res://scenes/blocks/turn.tscn" id="2_4khj1"]
[node name="level" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="ColorRect2" type="ColorRect" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
color = Color(0, 0, 0, 1)
[node name="ColorRect" type="ColorRect" parent="."]
layout_mode = 1
anchors_preset = -1
anchor_left = 0.746
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 0.119934
grow_horizontal = 0
grow_vertical = 2
mouse_filter = 2
color = Color(0.785692, 0.699005, 0.627718, 1)
[node name="ColorRect" type="ColorRect" parent="ColorRect"]
layout_mode = 1
anchors_preset = -1
anchor_left = -0.394
anchor_top = 0.028
anchor_bottom = 0.972
offset_left = 0.0500031
offset_top = -0.16
offset_bottom = 0.159973
grow_vertical = 2
mouse_filter = 2
color = Color(0.917647, 0.917647, 0.917647, 1)
[node name="VBoxContainer" type="VBoxContainer" parent="ColorRect/ColorRect"]
layout_mode = 1
anchors_preset = -1
anchor_top = 0.071
anchor_right = 1.0
anchor_bottom = 0.96
offset_top = -0.280003
offset_bottom = 0.199951
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
theme_override_constants/separation = 50
[node name="step" parent="ColorRect/ColorRect/VBoxContainer" instance=ExtResource("1_0rak5")]
layout_mode = 2
[node name="turn" parent="ColorRect/ColorRect/VBoxContainer" instance=ExtResource("2_4khj1")]
layout_mode = 2
[node name="VBoxContainer" type="VBoxContainer" parent="ColorRect"]
layout_mode = 1
anchors_preset = -1
anchor_left = 0.163
anchor_top = 0.05
anchor_right = 0.163
anchor_bottom = 0.05
offset_left = 0.0249977
offset_right = 269.025
offset_bottom = 647.0
mouse_filter = 2
theme_override_constants/separation = 50

View file

@ -1,2 +1,9 @@
extends Label
@onready var block_name = $"."
extends TextureButton
@onready var block_name = $Label
func _ready() -> void:
pass
func _on_pressed() -> void:
print(block_name.text)