[gd_scene load_steps=5 format=3 uid="uid://d3twfk56sjf2m"] [ext_resource type="Script" path="res://scenes/conway.gd" id="1_1gvb0"] [ext_resource type="Texture2D" uid="uid://c2vm5pfsamed4" path="res://assets/icon.svg" id="2_l6fa6"] [ext_resource type="Script" path="res://scenes/camera.gd" id="3_e0v0d"] [ext_resource type="Texture2D" uid="uid://b8gggrriib8n" path="res://assets/refresh.png" id="4_hmfh6"] [node name="World" type="Node2D"] position = Vector2(-152, 0) script = ExtResource("1_1gvb0") cell_texture = ExtResource("2_l6fa6") [node name="Camera" type="Camera2D" parent="."] position = Vector2(464, 200) script = ExtResource("3_e0v0d") [node name="GenerationTimer" type="Timer" parent="."] wait_time = 0.05 one_shot = true [node name="UI" type="CanvasLayer" parent="."] [node name="Background" type="Control" parent="UI"] layout_mode = 3 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 [node name="ColorRect" type="ColorRect" parent="UI/Background"] 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, 0.12549) [node name="Debug" type="MarginContainer" parent="UI"] visible = false offset_right = 106.0 offset_bottom = 116.0 [node name="VBoxContainer" type="VBoxContainer" parent="UI/Debug"] layout_mode = 2 [node name="WorldSeed" type="Label" parent="UI/Debug/VBoxContainer"] layout_mode = 2 text = "World Seed: 0" [node name="GenerationCounter" type="Label" parent="UI/Debug/VBoxContainer"] layout_mode = 2 text = "Generation: 1" [node name="LivingCellsCounter" type="Label" parent="UI/Debug/VBoxContainer"] layout_mode = 2 text = "Living Cells: 0" [node name="WorldGeneration" type="MarginContainer" parent="UI"] anchors_preset = 8 anchor_left = 0.5 anchor_top = 0.5 anchor_right = 0.5 anchor_bottom = 0.5 offset_left = -173.0 offset_top = -78.0 offset_right = 173.0 offset_bottom = 78.0 grow_horizontal = 2 grow_vertical = 2 size_flags_horizontal = 4 size_flags_vertical = 4 theme_override_constants/margin_left = 10 theme_override_constants/margin_top = 10 theme_override_constants/margin_right = 10 theme_override_constants/margin_bottom = 10 [node name="VBoxContainer" type="VBoxContainer" parent="UI/WorldGeneration"] layout_mode = 2 [node name="Seed" type="HBoxContainer" parent="UI/WorldGeneration/VBoxContainer"] layout_mode = 2 theme_override_constants/separation = 6 [node name="Label" type="Label" parent="UI/WorldGeneration/VBoxContainer/Seed"] custom_minimum_size = Vector2(120, 0) layout_mode = 2 text = "Seed" [node name="Generate" type="Button" parent="UI/WorldGeneration/VBoxContainer/Seed"] self_modulate = Color(0.501961, 0.501961, 0.501961, 1) layout_mode = 2 icon = ExtResource("4_hmfh6") [node name="Input" type="LineEdit" parent="UI/WorldGeneration/VBoxContainer/Seed"] custom_minimum_size = Vector2(200, 0) layout_mode = 2 placeholder_text = "Empty for Random" clear_button_enabled = true select_all_on_focus = true [node name="WorldSize" type="HBoxContainer" parent="UI/WorldGeneration/VBoxContainer"] layout_mode = 2 theme_override_constants/separation = 6 [node name="Label" type="Label" parent="UI/WorldGeneration/VBoxContainer/WorldSize"] custom_minimum_size = Vector2(120, 0) layout_mode = 2 text = "World Size" [node name="Padding" type="VSeparator" parent="UI/WorldGeneration/VBoxContainer/WorldSize"] modulate = Color(1, 1, 1, 0) layout_mode = 2 size_flags_horizontal = 3 [node name="Label_x" type="Label" parent="UI/WorldGeneration/VBoxContainer/WorldSize"] layout_mode = 2 text = "X:" [node name="Input_x" type="LineEdit" parent="UI/WorldGeneration/VBoxContainer/WorldSize"] custom_minimum_size = Vector2(20, 0) layout_mode = 2 text = "32" max_length = 4 select_all_on_focus = true [node name="Label_y" type="Label" parent="UI/WorldGeneration/VBoxContainer/WorldSize"] layout_mode = 2 text = "Y:" [node name="Input_y" type="LineEdit" parent="UI/WorldGeneration/VBoxContainer/WorldSize"] custom_minimum_size = Vector2(20, 0) layout_mode = 2 text = "32" max_length = 4 select_all_on_focus = true [node name="GenerationSpeed" type="HBoxContainer" parent="UI/WorldGeneration/VBoxContainer"] layout_mode = 2 [node name="Label" type="Label" parent="UI/WorldGeneration/VBoxContainer/GenerationSpeed"] layout_mode = 2 text = "Generation Speed" [node name="Padding" type="VSeparator" parent="UI/WorldGeneration/VBoxContainer/GenerationSpeed"] modulate = Color(1, 1, 1, 0) layout_mode = 2 size_flags_horizontal = 3 [node name="Input" type="HSlider" parent="UI/WorldGeneration/VBoxContainer/GenerationSpeed"] custom_minimum_size = Vector2(200, 0) layout_mode = 2 tooltip_text = "The higher the speed, the less time between generations. Slowest: 0.1/s Fastest: 0.01/s" min_value = 1.0 max_value = 5.0 value = 3.0 tick_count = 5 ticks_on_borders = true [node name="FinalRow" type="HBoxContainer" parent="UI/WorldGeneration/VBoxContainer"] layout_mode = 2 [node name="StartPausedButton" type="CheckBox" parent="UI/WorldGeneration/VBoxContainer/FinalRow"] layout_mode = 2 text = "Start Paused" [node name="Padding" type="VSeparator" parent="UI/WorldGeneration/VBoxContainer/FinalRow"] modulate = Color(1, 1, 1, 0) layout_mode = 2 size_flags_horizontal = 3 [node name="RunButton" type="Button" parent="UI/WorldGeneration/VBoxContainer/FinalRow"] layout_mode = 2 text = "Run" [node name="QuitButton" type="Button" parent="UI/WorldGeneration/VBoxContainer/FinalRow"] layout_direction = 3 layout_mode = 2 text = "Quit" [node name="Messages" type="MarginContainer" parent="UI"] anchors_preset = 7 anchor_left = 0.5 anchor_top = 1.0 anchor_right = 0.5 anchor_bottom = 1.0 offset_left = -20.0 offset_top = -40.0 offset_right = 20.0 grow_horizontal = 2 grow_vertical = 0 [node name="Label" type="Label" parent="UI/Messages"] visible = false layout_mode = 2 [connection signal="timeout" from="GenerationTimer" to="." method="_on_generation_timer_timeout"] [connection signal="pressed" from="UI/WorldGeneration/VBoxContainer/Seed/Generate" to="." method="_on_world_seed_generate_pressed"] [connection signal="drag_ended" from="UI/WorldGeneration/VBoxContainer/GenerationSpeed/Input" to="." method="_on_generation_speed_drag_ended"] [connection signal="toggled" from="UI/WorldGeneration/VBoxContainer/FinalRow/StartPausedButton" to="." method="_on_start_paused_button_toggled"] [connection signal="pressed" from="UI/WorldGeneration/VBoxContainer/FinalRow/RunButton" to="." method="_on_run_button_pressed"] [connection signal="pressed" from="UI/WorldGeneration/VBoxContainer/FinalRow/QuitButton" to="." method="_on_quit_button_pressed"]