maze_generator/maze.tscn

580 lines
13 KiB
Plaintext

[gd_scene load_steps=3 format=3 uid="uid://cg42xw5vv3pen"]
[ext_resource type="Script" path="res://maze.gd" id="1_764be"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_013op"]
bg_color = Color(0, 0, 0, 0)
draw_center = false
border_width_left = 1
border_width_top = 1
border_width_right = 1
border_width_bottom = 1
border_color = Color(1, 0, 0, 1)
corner_radius_top_left = 2
corner_radius_top_right = 2
corner_radius_bottom_right = 2
corner_radius_bottom_left = 2
corner_detail = 1
[node name="Maze" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_764be")
[node name="Title" type="RichTextLabel" parent="."]
layout_mode = 0
offset_right = 242.0
offset_bottom = 72.0
bbcode_enabled = true
text = "PROJECT_TITLE"
scroll_active = false
autowrap_mode = 0
shortcut_keys_enabled = false
[node name="Surface" type="RichTextLabel" parent="."]
layout_mode = 0
offset_left = 300.0
offset_top = 4.0
offset_right = 395.0
offset_bottom = 28.0
bbcode_enabled = true
text = "SURFACE_SIZE"
scroll_active = false
autowrap_mode = 0
shortcut_keys_enabled = false
[node name="surface_size_x" type="SpinBox" parent="."]
layout_mode = 0
offset_left = 400.0
offset_top = 2.0
offset_right = 483.063
offset_bottom = 33.0
min_value = 1.0
max_value = 57.0
value = 1.0
alignment = 1
[node name="surface_size_y" type="SpinBox" parent="."]
layout_mode = 0
offset_left = 485.063
offset_top = 2.0
offset_right = 568.125
offset_bottom = 33.0
min_value = 1.0
max_value = 27.0
value = 1.0
alignment = 1
[node name="Surface order" type="RichTextLabel" parent="."]
layout_mode = 0
offset_left = 580.126
offset_top = 4.0
offset_right = 606.126
offset_bottom = 28.0
text = "X,Y"
scroll_active = false
autowrap_mode = 0
shortcut_keys_enabled = false
[node name="Case" type="RichTextLabel" parent="."]
layout_mode = 0
offset_left = 300.0
offset_top = 36.0
offset_right = 395.0
offset_bottom = 60.0
bbcode_enabled = true
text = "CASE_SIZE"
scroll_active = false
autowrap_mode = 0
shortcut_keys_enabled = false
[node name="case_size" type="SpinBox" parent="."]
layout_mode = 0
offset_left = 400.0
offset_top = 35.0
offset_right = 483.063
offset_bottom = 66.0
min_value = 1.0
max_value = 9.0
value = 1.0
alignment = 1
[node name="Limitations" type="Control" parent="."]
anchors_preset = 0
offset_left = 610.0
offset_top = 1.0
offset_right = 804.0
offset_bottom = 94.0
[node name="text" type="RichTextLabel" parent="Limitations"]
layout_mode = 1
anchors_preset = 10
anchor_right = 1.0
offset_bottom = 24.0
grow_horizontal = 2
bbcode_enabled = true
text = "DEMO"
scroll_active = false
autowrap_mode = 0
shortcut_keys_enabled = false
[node name="x" type="RichTextLabel" parent="Limitations"]
layout_mode = 1
anchors_preset = 14
anchor_top = 0.5
anchor_right = 1.0
anchor_bottom = 0.5
offset_top = -22.5
offset_bottom = 1.5
grow_horizontal = 2
grow_vertical = 2
bbcode_enabled = true
text = "[center]1 ≤ X ≤ [/center]"
scroll_active = false
autowrap_mode = 0
shortcut_keys_enabled = false
[node name="max" type="RichTextLabel" parent="Limitations/x"]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = 17.0
offset_top = -12.0
offset_right = 36.0
offset_bottom = 12.0
grow_horizontal = 2
grow_vertical = 2
text = "57"
scroll_active = false
autowrap_mode = 0
shortcut_keys_enabled = false
[node name="y" type="RichTextLabel" parent="Limitations"]
layout_mode = 1
anchors_preset = 14
anchor_top = 0.5
anchor_right = 1.0
anchor_bottom = 0.5
offset_top = -4.5
offset_bottom = 19.5
grow_horizontal = 2
grow_vertical = 2
bbcode_enabled = true
text = "[center]1 ≤ Y ≤ [/center]"
scroll_active = false
autowrap_mode = 0
shortcut_keys_enabled = false
[node name="max" type="RichTextLabel" parent="Limitations/y"]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = 17.0
offset_top = -12.0
offset_right = 36.0
offset_bottom = 12.0
grow_horizontal = 2
grow_vertical = 2
text = "27"
scroll_active = false
autowrap_mode = 0
shortcut_keys_enabled = false
[node name="case" type="RichTextLabel" parent="Limitations"]
layout_mode = 1
anchors_preset = 14
anchor_top = 0.5
anchor_right = 1.0
anchor_bottom = 0.5
offset_top = 19.5
offset_bottom = 43.5
grow_horizontal = 2
grow_vertical = 2
bbcode_enabled = true
text = "DEMO_CASE"
scroll_active = false
autowrap_mode = 0
shortcut_keys_enabled = false
[node name="Generate" type="Button" parent="."]
layout_mode = 1
anchors_preset = 1
anchor_left = 1.0
anchor_right = 1.0
offset_left = -222.0
offset_top = 2.0
offset_right = -2.0
offset_bottom = 65.0
grow_horizontal = 0
theme_override_font_sizes/font_size = 40
text = "GENERATE"
[node name="maze" type="ColorRect" parent="."]
layout_mode = 0
offset_left = 6.0
offset_top = 95.0
offset_right = 1146.0
offset_bottom = 635.0
color = Color(0, 0, 0, 1)
[node name="record" type="CheckBox" parent="."]
layout_mode = 0
offset_left = 930.0
offset_top = 65.0
offset_right = 1147.0
offset_bottom = 96.0
button_pressed = true
text = "RECORD"
[node name="Captions" type="Control" parent="."]
anchors_preset = 0
offset_left = 6.0
offset_top = 75.0
offset_right = 417.0
offset_bottom = 89.0
[node name="Free cell" type="ColorRect" parent="Captions"]
layout_mode = 2
offset_right = 14.0
offset_bottom = 14.0
size_flags_horizontal = 3
size_flags_stretch_ratio = 0.2
color = Color(0.188235, 0.188235, 0.188235, 1)
[node name="Free cell text" type="RichTextLabel" parent="Captions"]
layout_mode = 2
offset_left = 15.0
offset_right = 47.0
offset_bottom = 14.0
size_flags_horizontal = 3
size_flags_stretch_ratio = 0.3
bbcode_enabled = true
text = "FREE"
scroll_active = false
autowrap_mode = 0
shortcut_keys_enabled = false
[node name="Unopenable wall" type="ColorRect" parent="Captions"]
layout_mode = 2
offset_left = 47.0
offset_right = 61.0
offset_bottom = 14.0
size_flags_horizontal = 3
size_flags_stretch_ratio = 0.2
color = Color(1, 0, 0, 1)
[node name="Unopenable wall text" type="RichTextLabel" parent="Captions"]
layout_mode = 2
offset_left = 63.0
offset_right = 128.0
offset_bottom = 14.0
size_flags_horizontal = 3
size_flags_stretch_ratio = 1.1
bbcode_enabled = true
text = "CLOSED_WALL"
scroll_active = false
autowrap_mode = 0
shortcut_keys_enabled = false
[node name="Visited cell" type="ColorRect" parent="Captions"]
layout_mode = 2
offset_left = 128.0
offset_right = 142.0
offset_bottom = 14.0
size_flags_horizontal = 3
size_flags_stretch_ratio = 0.2
color = Color(0, 1, 0, 1)
[node name="Visited cell text" type="RichTextLabel" parent="Captions"]
layout_mode = 2
offset_left = 144.0
offset_right = 187.0
offset_bottom = 14.0
size_flags_horizontal = 3
size_flags_stretch_ratio = 0.7
bbcode_enabled = true
text = "VISITED"
scroll_active = false
autowrap_mode = 0
shortcut_keys_enabled = false
[node name="Available cell" type="ColorRect" parent="Captions"]
layout_mode = 2
offset_left = 187.0
offset_right = 201.0
offset_bottom = 14.0
size_flags_horizontal = 3
size_flags_stretch_ratio = 0.2
[node name="Available cell text" type="RichTextLabel" parent="Captions"]
layout_mode = 2
offset_left = 203.0
offset_right = 258.0
offset_bottom = 14.0
size_flags_horizontal = 3
size_flags_stretch_ratio = 0.9
bbcode_enabled = true
text = "AVAILABLE"
scroll_active = false
autowrap_mode = 0
shortcut_keys_enabled = false
[node name="Openable wall" type="ColorRect" parent="Captions"]
layout_mode = 2
offset_left = 258.0
offset_right = 272.0
offset_bottom = 14.0
size_flags_horizontal = 3
size_flags_stretch_ratio = 0.2
color = Color(0.501961, 0, 0.501961, 1)
[node name="Openable wall text" type="RichTextLabel" parent="Captions"]
layout_mode = 2
offset_left = 274.0
offset_right = 305.0
offset_bottom = 14.0
size_flags_horizontal = 3
size_flags_stretch_ratio = 0.4
bbcode_enabled = true
text = "WALL"
scroll_active = false
autowrap_mode = 0
shortcut_keys_enabled = false
[node name="3-way intersection" type="ColorRect" parent="Captions"]
layout_mode = 2
offset_left = 305.0
offset_right = 319.0
offset_bottom = 14.0
size_flags_horizontal = 3
size_flags_stretch_ratio = 0.2
color = Color(0, 0, 1, 1)
[node name="3-way intersection text" type="RichTextLabel" parent="Captions"]
layout_mode = 2
offset_left = 321.0
offset_right = 477.0
offset_bottom = 14.0
size_flags_horizontal = 3
bbcode_enabled = true
text = "INTERSECTION"
scroll_active = false
autowrap_mode = 0
shortcut_keys_enabled = false
[node name="Visualization box" type="Panel" parent="Captions"]
visible = false
layout_mode = 0
offset_left = 184.0
offset_top = -3.0
offset_right = 413.0
offset_bottom = 17.0
theme_override_styles/panel = SubResource("StyleBoxFlat_013op")
[node name="Visualization text" type="RichTextLabel" parent="Captions"]
visible = false
layout_mode = 0
offset_left = 415.0
offset_top = -1.0
offset_right = 637.0
offset_bottom = 18.0
theme_override_colors/default_color = Color(1, 0, 0, 1)
theme_override_font_sizes/normal_font_size = 11
bbcode_enabled = true
text = "WARNING"
scroll_active = false
autowrap_mode = 0
shortcut_keys_enabled = false
[node name="Tooltip" type="Control" parent="."]
visible = false
top_level = true
layout_mode = 1
anchors_preset = 0
offset_right = 86.0
offset_bottom = 43.0
[node name="Background" type="ColorRect" parent="Tooltip"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
color = Color(0, 0, 0, 1)
[node name="position" type="RichTextLabel" parent="Tooltip"]
layout_mode = 0
offset_left = 5.0
offset_right = 81.0
offset_bottom = 24.0
bbcode_enabled = true
text = "[color=yellow]X:[/color] [color=yellow]Y:[/color]"
scroll_active = false
autowrap_mode = 0
shortcut_keys_enabled = false
[node name="x" type="RichTextLabel" parent="Tooltip/position"]
layout_mode = 0
offset_left = 18.0
offset_right = 37.0
offset_bottom = 24.0
text = "0"
scroll_active = false
autowrap_mode = 0
shortcut_keys_enabled = false
text_direction = 2
[node name="y" type="RichTextLabel" parent="Tooltip/position"]
layout_mode = 0
offset_left = 57.0
offset_right = 76.0
offset_bottom = 24.0
text = "0"
scroll_active = false
autowrap_mode = 0
shortcut_keys_enabled = false
text_direction = 2
[node name="case_type" type="RichTextLabel" parent="Tooltip"]
clip_contents = false
layout_mode = 0
offset_left = 4.0
offset_top = 19.0
offset_right = 4.0
offset_bottom = 43.0
scroll_active = false
autowrap_mode = 0
shortcut_keys_enabled = false
[node name="Progress" type="Control" parent="."]
visible = false
layout_mode = 1
anchors_preset = 12
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_top = -13.0
grow_horizontal = 2
grow_vertical = 0
[node name="bar" type="ColorRect" parent="Progress"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
color = Color(0, 1, 0, 1)
[node name="text" type="RichTextLabel" parent="Progress"]
clip_contents = false
layout_mode = 1
anchors_preset = 6
anchor_left = 1.0
anchor_top = 0.5
anchor_right = 1.0
anchor_bottom = 0.5
offset_top = -9.5
offset_bottom = 7.5
grow_horizontal = 0
grow_vertical = 2
theme_override_font_sizes/normal_font_size = 11
bbcode_enabled = true
text = "PROGRESS"
scroll_active = false
autowrap_mode = 0
shortcut_keys_enabled = false
text_direction = 2
[node name="count" type="RichTextLabel" parent="Progress"]
layout_mode = 1
anchors_preset = 6
anchor_left = 1.0
anchor_top = 0.5
anchor_right = 1.0
anchor_bottom = 0.5
offset_left = -42.0
offset_top = -9.5
offset_bottom = 7.5
grow_horizontal = 0
grow_vertical = 2
theme_override_font_sizes/normal_font_size = 11
text = "0/0"
scroll_active = false
autowrap_mode = 0
shortcut_keys_enabled = false
text_direction = 2
[node name="Export" type="Control" parent="."]
visible = false
anchors_preset = 0
offset_left = 809.0
offset_top = 4.0
offset_right = 923.0
offset_bottom = 87.0
[node name="Choices" type="RichTextLabel" parent="Export"]
layout_mode = 1
anchors_preset = 10
anchor_right = 1.0
offset_bottom = 28.0
grow_horizontal = 2
bbcode_enabled = true
text = "EXPORT"
scroll_active = false
autowrap_mode = 0
shortcut_keys_enabled = false
[node name="CSV" type="Button" parent="Export"]
layout_mode = 0
offset_left = 1.0
offset_top = 28.0
offset_right = 113.0
offset_bottom = 56.0
theme_override_font_sizes/font_size = 12
text = "EXPORT_CSV"
[node name="JS" type="Button" parent="Export"]
layout_mode = 0
offset_left = 1.0
offset_top = 58.0
offset_right = 113.0
offset_bottom = 86.0
theme_override_font_sizes/font_size = 12
text = "EXPORT_JS"
[node name="Language hint" type="RichTextLabel" parent="."]
layout_mode = 1
anchors_preset = 12
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_top = -16.0
offset_bottom = 1.0
grow_horizontal = 2
grow_vertical = 0
theme_override_font_sizes/normal_font_size = 11
text = "LANGUAGE"
scroll_active = false
autowrap_mode = 0
shortcut_keys_enabled = false
[connection signal="value_changed" from="surface_size_x" to="." method="_on_surface_size_x_changed"]
[connection signal="value_changed" from="surface_size_y" to="." method="_on_surface_size_y_changed"]
[connection signal="value_changed" from="case_size" to="." method="_on_case_size_value_changed"]
[connection signal="pressed" from="Generate" to="." method="_on_generate_pressed"]
[connection signal="toggled" from="record" to="." method="_on_record_toggled"]
[connection signal="pressed" from="Export/CSV" to="." method="maze_to_CSV"]
[connection signal="pressed" from="Export/JS" to="." method="maze_to_JS"]