diff --git a/world.gd b/world.gd index b0934db..f8cb642 100644 --- a/world.gd +++ b/world.gd @@ -196,7 +196,10 @@ func _on_generation_timer_timeout() -> void: generation_timer.start() -func _on_generation_submit_pressed() -> void: +func _on_quit_button_pressed() -> void: + get_tree().quit() + +func _on_run_button_pressed() -> void: if not generation_seed.text.strip_edges(): world_seed = randi() else: diff --git a/world.tscn b/world.tscn index 27a983d..37e135e 100644 --- a/world.tscn +++ b/world.tscn @@ -112,6 +112,11 @@ 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:" @@ -143,6 +148,11 @@ custom_minimum_size = Vector2(120, 0) layout_mode = 2 text = "Cell Size" +[node name="Padding" type="VSeparator" parent="UI/WorldGeneration/VBoxContainer/CellSize"] +modulate = Color(1, 1, 1, 0) +layout_mode = 2 +size_flags_horizontal = 3 + [node name="Label_x" type="Label" parent="UI/WorldGeneration/VBoxContainer/CellSize"] layout_mode = 2 text = "X:" @@ -165,14 +175,24 @@ text = "16" max_length = 4 select_all_on_focus = true +[node name="FinalRow" type="HBoxContainer" parent="UI/WorldGeneration/VBoxContainer"] +layout_mode = 2 + +[node name="RunButton" type="Button" parent="UI/WorldGeneration/VBoxContainer/FinalRow"] +layout_mode = 2 +text = "Run" -[node name="Submit" type="HBoxContainer" parent="UI/WorldGeneration/VBoxContainer"] +[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="Button" type="Button" parent="UI/WorldGeneration/VBoxContainer/Submit"] +[node name="QuitButton" type="Button" parent="UI/WorldGeneration/VBoxContainer/FinalRow"] +layout_direction = 3 layout_mode = 2 -text = "Start" +text = "Quit" [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="pressed" from="UI/WorldGeneration/VBoxContainer/Submit/Button" to="." method="_on_generation_submit_pressed"] +[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"]